mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 03:41:25 -07:00
correctly set delegated host name in results
This commit is contained in:
parent
0bbf0e8d19
commit
a457c2af59
1 changed files with 2 additions and 2 deletions
|
@ -627,8 +627,8 @@ class TaskExecutor:
|
||||||
# there is another source of truth we can use
|
# there is another source of truth we can use
|
||||||
delegated_vars = variables.get('ansible_delegated_vars', dict()).get(self._task.delegate_to, dict()).copy()
|
delegated_vars = variables.get('ansible_delegated_vars', dict()).get(self._task.delegate_to, dict()).copy()
|
||||||
if len(delegated_vars) > 0:
|
if len(delegated_vars) > 0:
|
||||||
result["_ansible_delegated_vars"] = dict()
|
result["_ansible_delegated_vars"] = {'ansible_delegated_host': self._task.delegate_to}
|
||||||
for k in ('ansible_delegated_host', 'ansible_host'):
|
for k in ('ansible_host', ):
|
||||||
result["_ansible_delegated_vars"][k] = delegated_vars.get(k)
|
result["_ansible_delegated_vars"][k] = delegated_vars.get(k)
|
||||||
|
|
||||||
# and return
|
# and return
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue