fixes #1767 parsing serial from extra_vars

This commit is contained in:
Nandor Sivok 2012-12-14 13:21:58 +01:00
parent 23f2a7fc7e
commit e91db5fcdc
2 changed files with 2 additions and 2 deletions

View file

@ -406,7 +406,7 @@ class PlayBook(object):
# do N forks all the way through before moving to next # do N forks all the way through before moving to next
while len(all_hosts) > 0: while len(all_hosts) > 0:
play_hosts = [] play_hosts = []
for x in range(play.serial): for x in range(int(play.serial)):
if len(all_hosts) > 0: if len(all_hosts) > 0:
play_hosts.append(all_hosts.pop()) play_hosts.append(all_hosts.pop())
serialized_batch.append(play_hosts) serialized_batch.append(play_hosts)

View file

@ -75,7 +75,7 @@ class Play(object):
self.transport = ds.get('connection', self.playbook.transport) self.transport = ds.get('connection', self.playbook.transport)
self.tags = ds.get('tags', None) self.tags = ds.get('tags', None)
self.gather_facts = ds.get('gather_facts', None) self.gather_facts = ds.get('gather_facts', None)
self.serial = ds.get('serial', 0) self.serial = utils.template_ds(basedir, ds.get('serial', 0), self.vars)
if isinstance(self.remote_port, basestring): if isinstance(self.remote_port, basestring):
self.remote_port = utils.template(basedir, self.remote_port, self.vars) self.remote_port = utils.template(basedir, self.remote_port, self.vars)