From f31fbdff1fe7ac9468a76484b4999892f3a1da6e Mon Sep 17 00:00:00 2001 From: Nandor Sivok Date: Fri, 14 Dec 2012 18:05:08 +0100 Subject: [PATCH] moving int() conversion to the play init --- lib/ansible/playbook/__init__.py | 2 +- lib/ansible/playbook/play.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/playbook/__init__.py b/lib/ansible/playbook/__init__.py index 124ce78ce7..68de7ed23d 100644 --- a/lib/ansible/playbook/__init__.py +++ b/lib/ansible/playbook/__init__.py @@ -406,7 +406,7 @@ class PlayBook(object): # do N forks all the way through before moving to next while len(all_hosts) > 0: play_hosts = [] - for x in range(int(play.serial)): + for x in range(play.serial): if len(all_hosts) > 0: play_hosts.append(all_hosts.pop()) serialized_batch.append(play_hosts) diff --git a/lib/ansible/playbook/play.py b/lib/ansible/playbook/play.py index 67da07fd18..dcb01e4e90 100644 --- a/lib/ansible/playbook/play.py +++ b/lib/ansible/playbook/play.py @@ -75,7 +75,7 @@ class Play(object): self.transport = ds.get('connection', self.playbook.transport) self.tags = ds.get('tags', None) self.gather_facts = ds.get('gather_facts', None) - self.serial = utils.template_ds(basedir, ds.get('serial', 0), self.vars) + self.serial = int(utils.template_ds(basedir, ds.get('serial', 0), self.vars)) if isinstance(self.remote_port, basestring): self.remote_port = utils.template(basedir, self.remote_port, self.vars)