Fix unreachable host detection and have plays continue after unreachable failures

Fixes #12284
This commit is contained in:
James Cammarata 2015-09-09 15:26:40 -04:00
commit be7bd392cb
6 changed files with 17 additions and 11 deletions

View file

@ -55,7 +55,7 @@ class StrategyModule(StrategyBase):
work_to_do = True
while work_to_do and not self._tqm._terminated:
hosts_left = self._inventory.get_hosts(iterator._play.hosts)
hosts_left = [host for host in self._inventory.get_hosts(iterator._play.hosts) if host.name not in self._tqm._unreachable_hosts]
if len(hosts_left) == 0:
self._tqm.send_callback('v2_playbook_on_no_hosts_remaining')
result = False