Fix free strategy only running first play in a multi-play playbook

Fixes #11839
pull/8127/merge
James Cammarata 9 years ago
parent c2435fab7e
commit ed603f7030

@ -53,7 +53,7 @@ class StrategyModule(StrategyBase):
work_to_do = True work_to_do = True
while work_to_do and not self._tqm._terminated: 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: if len(hosts_left) == 0:
self._tqm.send_callback('v2_playbook_on_no_hosts_remaining') self._tqm.send_callback('v2_playbook_on_no_hosts_remaining')
result = False result = False
@ -149,10 +149,9 @@ class StrategyModule(StrategyBase):
except Exception as e: except Exception as e:
# FIXME: ctrl+c can cause some failures here, so catch them # FIXME: ctrl+c can cause some failures here, so catch them
# with the appropriate error type # with the appropriate error type
print("wtf: %s" % e)
pass pass
# run the base class run() method, which executes the cleanup function # run the base class run() method, which executes the cleanup function
# and runs any outstanding handlers which have been triggered # 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)

Loading…
Cancel
Save