mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 11:21:25 -07:00
Fix with loop + delegate issues
* Don't re-use the existing connection if the remote_addr field of the play context has changed * When overriding variables in PlayContext (from task/variables), don't set the same attribute based on a different variable name if we had already previously set it from another variable name Fixes #13880
This commit is contained in:
parent
1c9774785f
commit
1733d434d1
2 changed files with 6 additions and 1 deletions
|
@ -367,7 +367,7 @@ class TaskExecutor:
|
|||
self._task.args = variable_params
|
||||
|
||||
# get the connection and the handler for this execution
|
||||
if not self._connection or not getattr(self._connection, 'connected', False):
|
||||
if not self._connection or not getattr(self._connection, 'connected', False) or self._play_context.remote_addr != self._connection._play_context.remote_addr:
|
||||
self._connection = self._get_connection(variables=variables, templar=templar)
|
||||
self._connection.set_host_overrides(host=self._host)
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue