Don't mark hosts failed if they've moved to a rescue portion of a block

Fixes #13521
pull/13529/head
James Cammarata 9 years ago
parent 97554fc222
commit 7f7e730dea

@ -30,6 +30,11 @@ from jinja2.exceptions import UndefinedError
from ansible import constants as C
from ansible.errors import AnsibleError, AnsibleParserError, AnsibleUndefinedVariable
<<<<<<< Updated upstream
=======
from ansible.executor.play_iterator import PlayIterator
from ansible.executor.process.worker import WorkerProcess
>>>>>>> Stashed changes
from ansible.executor.task_result import TaskResult
from ansible.inventory.host import Host
from ansible.inventory.group import Group
@ -202,6 +207,8 @@ class StrategyBase:
[iterator.mark_host_failed(h) for h in self._inventory.get_hosts(iterator._play.hosts) if h.name not in self._tqm._unreachable_hosts]
else:
iterator.mark_host_failed(host)
(state, tmp_task) = iterator.get_next_task_for_host(host, peek=True)
if state.run_state != PlayIterator.ITERATING_RESCUE:
self._tqm._failed_hosts[host.name] = True
self._tqm._stats.increment('failures', host.name)
else:

Loading…
Cancel
Save