Backward compatibility execution failures with 1.9
This commit is contained in:
parent
48aa9153f2
commit
ba89b2a095
2 changed files with 3 additions and 4 deletions
|
@ -151,9 +151,8 @@ class PlaybookExecutor:
|
||||||
elif len(batch) == failed_hosts_count:
|
elif len(batch) == failed_hosts_count:
|
||||||
break
|
break
|
||||||
|
|
||||||
# clear the failed hosts dictionaires in the TQM for the next batch
|
# save the unreachable hosts from this batch
|
||||||
self._unreachable_hosts.update(self._tqm._unreachable_hosts)
|
self._unreachable_hosts.update(self._tqm._unreachable_hosts)
|
||||||
self._tqm.clear_failed_hosts()
|
|
||||||
|
|
||||||
# if the last result wasn't zero or 3 (some hosts were unreachable),
|
# if the last result wasn't zero or 3 (some hosts were unreachable),
|
||||||
# break out of the serial batch loop
|
# break out of the serial batch loop
|
||||||
|
|
|
@ -163,7 +163,7 @@ class StrategyModule(StrategyBase):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
display.debug("getting the remaining hosts for this loop")
|
display.debug("getting the remaining hosts for this loop")
|
||||||
hosts_left = [host for host in self._inventory.get_hosts(iterator._play.hosts) if host.name not in self._tqm._unreachable_hosts]
|
hosts_left = [host for host in self._inventory.get_hosts(iterator._play.hosts) if host.name not in self._tqm._unreachable_hosts and not iterator.is_failed(host)]
|
||||||
display.debug("done getting the remaining hosts for this loop")
|
display.debug("done getting the remaining hosts for this loop")
|
||||||
|
|
||||||
# queue up this task for each host in the inventory
|
# queue up this task for each host in the inventory
|
||||||
|
@ -350,7 +350,7 @@ class StrategyModule(StrategyBase):
|
||||||
display.debug("checking for any_errors_fatal")
|
display.debug("checking for any_errors_fatal")
|
||||||
failed_hosts = []
|
failed_hosts = []
|
||||||
for res in results:
|
for res in results:
|
||||||
if res.is_failed() or res.is_unreachable():
|
if res.is_failed():
|
||||||
failed_hosts.append(res._host.name)
|
failed_hosts.append(res._host.name)
|
||||||
|
|
||||||
# if any_errors_fatal and we had an error, mark all hosts as failed
|
# if any_errors_fatal and we had an error, mark all hosts as failed
|
||||||
|
|
Loading…
Reference in a new issue