mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00: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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user