mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-29 11:40:22 -07:00
the return of reset_connection
allows user to force persistent connection to close, needed for when you want to benefit from changes applied to the current play but persistent connections prevent them from being realized.
This commit is contained in:
parent
36aad569d2
commit
cc0bb54d2c
3 changed files with 26 additions and 22 deletions
|
@ -902,8 +902,10 @@ class StrategyBase:
|
|||
if not host.name in self._tqm._unreachable_hosts:
|
||||
iterator._host_states[host.name].run_state = iterator.ITERATING_COMPLETE
|
||||
msg="ending play"
|
||||
#elif meta_action == 'reset_connection':
|
||||
# connection_info.connection.close()
|
||||
elif meta_action == 'reset_connection':
|
||||
connection = connection_loader.get(play_context.connection, play_context, '/dev/null')
|
||||
connection.reset()
|
||||
msg= 'reset connection'
|
||||
else:
|
||||
raise AnsibleError("invalid meta action requested: %s" % meta_action, obj=task._ds)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue