diff options
author | James Cammarata <jimi@sngx.net> | 2015-08-03 14:40:16 -0400 |
---|---|---|
committer | James Cammarata <jimi@sngx.net> | 2015-08-03 14:40:16 -0400 |
commit | ed603f70309de7f32129f7c6816d0ec646f80fcd (patch) | |
tree | af018c30d31c427893ad3b5147ada9909bfed3ae | |
parent | c2435fab7edf39ef5f36d924bee33cb37dd0795d (diff) | |
download | ansible-ed603f70309de7f32129f7c6816d0ec646f80fcd.tar.gz |
Fix free strategy only running first play in a multi-play playbook
Fixes #11839
-rw-r--r-- | lib/ansible/plugins/strategies/free.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/ansible/plugins/strategies/free.py b/lib/ansible/plugins/strategies/free.py index 683a96ba7e..ea894c5bf6 100644 --- a/lib/ansible/plugins/strategies/free.py +++ b/lib/ansible/plugins/strategies/free.py @@ -53,7 +53,7 @@ class StrategyModule(StrategyBase): work_to_do = True while work_to_do and not self._tqm._terminated: - hosts_left = self.get_hosts_remaining(iterator._play) + hosts_left = self._inventory.get_hosts(iterator._play.hosts) if len(hosts_left) == 0: self._tqm.send_callback('v2_playbook_on_no_hosts_remaining') result = False @@ -149,10 +149,9 @@ class StrategyModule(StrategyBase): except Exception as e: # FIXME: ctrl+c can cause some failures here, so catch them # with the appropriate error type - print("wtf: %s" % e) pass # run the base class run() method, which executes the cleanup function # and runs any outstanding handlers which have been triggered - super(StrategyModule, self).run(iterator, play_context) + return super(StrategyModule, self).run(iterator, play_context, result) |