mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 03:11:24 -07:00
Make sure magic variables are available when templating vars_files
Also does some reorganization/cleanup on the magic vars/delegated variable generation portions of VariableManager to make the above possible. Fixes #12633
This commit is contained in:
parent
284bd118a0
commit
d91b3c6b9d
2 changed files with 119 additions and 102 deletions
|
@ -486,7 +486,7 @@ class TaskExecutor:
|
|||
del variables[i]
|
||||
# now replace the interpreter values with those that may have come
|
||||
# from the delegated-to host
|
||||
delegated_vars = variables.get('ansible_delegated_vars', dict())
|
||||
delegated_vars = variables.get('ansible_delegated_vars', dict()).get(self._host.name, dict())
|
||||
if isinstance(delegated_vars, dict):
|
||||
for i in delegated_vars:
|
||||
if i.startswith("ansible_") and i.endswith("_interpreter"):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue