mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Adding new feature - meta: clear_host_errors
Allows for the clearing of any failed/unreachable hosts
This commit is contained in:
parent
c433289a8b
commit
da9ae14ff6
1 changed files with 5 additions and 0 deletions
|
@ -656,5 +656,10 @@ class StrategyBase:
|
||||||
self._inventory.refresh_inventory()
|
self._inventory.refresh_inventory()
|
||||||
#elif meta_action == 'reset_connection':
|
#elif meta_action == 'reset_connection':
|
||||||
# connection_info.connection.close()
|
# connection_info.connection.close()
|
||||||
|
elif meta_action == 'clear_host_errors':
|
||||||
|
self._tqm._failed_hosts = dict()
|
||||||
|
self._tqm._unreachable_hosts = dict()
|
||||||
|
for host in iterator._host_states:
|
||||||
|
iterator._host_states[host].fail_state = iterator.FAILED_NONE
|
||||||
else:
|
else:
|
||||||
raise AnsibleError("invalid meta action requested: %s" % meta_action, obj=task._ds)
|
raise AnsibleError("invalid meta action requested: %s" % meta_action, obj=task._ds)
|
||||||
|
|
Loading…
Reference in a new issue