diff options
author | Vincent Roy <vincentroy8@gmail.com> | 2016-04-12 19:04:44 -0300 |
---|---|---|
committer | James Cammarata <jimi@sngx.net> | 2016-05-18 08:17:53 -0400 |
commit | c901c9144c9338b0bfea37a57e646e56fe602005 (patch) | |
tree | 60746c8870f40d55117005fc0b815c3668537c32 | |
parent | 76cd7cadfea63fd9b5e89cac046cee406382eade (diff) | |
download | ansible-c901c9144c9338b0bfea37a57e646e56fe602005.tar.gz |
Backward compatibility execution failures with 1.9
-rw-r--r-- | lib/ansible/executor/playbook_executor.py | 3 | ||||
-rw-r--r-- | lib/ansible/plugins/strategy/linear.py | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/lib/ansible/executor/playbook_executor.py b/lib/ansible/executor/playbook_executor.py index 7179692123..501e90ee2c 100644 --- a/lib/ansible/executor/playbook_executor.py +++ b/lib/ansible/executor/playbook_executor.py @@ -151,9 +151,8 @@ class PlaybookExecutor: elif len(batch) == failed_hosts_count: 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._tqm.clear_failed_hosts() # if the last result wasn't zero or 3 (some hosts were unreachable), # break out of the serial batch loop diff --git a/lib/ansible/plugins/strategy/linear.py b/lib/ansible/plugins/strategy/linear.py index 9ab302e0da..c386df7fe1 100644 --- a/lib/ansible/plugins/strategy/linear.py +++ b/lib/ansible/plugins/strategy/linear.py @@ -163,7 +163,7 @@ class StrategyModule(StrategyBase): try: 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") # queue up this task for each host in the inventory @@ -350,7 +350,7 @@ class StrategyModule(StrategyBase): display.debug("checking for any_errors_fatal") failed_hosts = [] for res in results: - if res.is_failed() or res.is_unreachable(): + if res.is_failed(): failed_hosts.append(res._host.name) # if any_errors_fatal and we had an error, mark all hosts as failed |