mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 21:00:22 -07:00
New keyword: ignore_unreachable (#43857)
This commit is contained in:
parent
2603604fd6
commit
653d9c0f87
15 changed files with 129 additions and 2 deletions
|
@ -511,8 +511,13 @@ class StrategyBase:
|
|||
self._tqm._stats.increment('changed', original_host.name)
|
||||
self._tqm.send_callback('v2_runner_on_failed', task_result, ignore_errors=ignore_errors)
|
||||
elif task_result.is_unreachable():
|
||||
self._tqm._unreachable_hosts[original_host.name] = True
|
||||
iterator._play._removed_hosts.append(original_host.name)
|
||||
ignore_unreachable = original_task.ignore_unreachable
|
||||
if not ignore_unreachable:
|
||||
self._tqm._unreachable_hosts[original_host.name] = True
|
||||
iterator._play._removed_hosts.append(original_host.name)
|
||||
else:
|
||||
self._tqm._stats.increment('skipped', original_host.name)
|
||||
task_result._result['skip_reason'] = 'Host %s is unreachable' % original_host.name
|
||||
self._tqm._stats.increment('dark', original_host.name)
|
||||
self._tqm.send_callback('v2_runner_on_unreachable', task_result)
|
||||
elif task_result.is_skipped():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue