mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Set some default vars on hosts created for delegate_to connections
This commit is contained in:
parent
a22f7b883d
commit
18adfc6d1a
1 changed files with 8 additions and 0 deletions
|
@ -315,8 +315,16 @@ class VariableManager:
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
delegated_host = Host(name=delegated_host_name)
|
delegated_host = Host(name=delegated_host_name)
|
||||||
|
delegated_host.vars.update(dict(
|
||||||
|
ansible_host=delegated_host_name,
|
||||||
|
ansible_connection = C.DEFAULT_TRANSPORT,
|
||||||
|
))
|
||||||
else:
|
else:
|
||||||
delegated_host = Host(name=delegated_host_name)
|
delegated_host = Host(name=delegated_host_name)
|
||||||
|
delegated_host.vars.update(dict(
|
||||||
|
ansible_host=delegated_host_name,
|
||||||
|
ansible_connection = C.DEFAULT_TRANSPORT,
|
||||||
|
))
|
||||||
|
|
||||||
# now we go fetch the vars for the delegated-to host and save them in our
|
# now we go fetch the vars for the delegated-to host and save them in our
|
||||||
# master dictionary of variables to be used later in the TaskExecutor/PlayContext
|
# master dictionary of variables to be used later in the TaskExecutor/PlayContext
|
||||||
|
|
Loading…
Reference in a new issue