mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-05 16:04:09 -07:00
parent
a4a37e8dfb
commit
006f08da99
3 changed files with 16 additions and 7 deletions
|
@ -43,7 +43,7 @@ from ansible.template import Templar
|
|||
from ansible.utils.listify import listify_lookup_plugin_terms
|
||||
from ansible.utils.vars import combine_vars
|
||||
from ansible.utils.unsafe_proxy import wrap_var
|
||||
from ansible.vars.clean import namespace_facts
|
||||
from ansible.vars.clean import namespace_facts, clean_facts
|
||||
|
||||
try:
|
||||
from __main__ import display
|
||||
|
@ -313,7 +313,7 @@ class VariableManager:
|
|||
|
||||
# push facts to main namespace
|
||||
if C.INJECT_FACTS_AS_VARS:
|
||||
all_vars = combine_vars(all_vars, wrap_var(facts))
|
||||
all_vars = combine_vars(all_vars, wrap_var(clean_facts(facts)))
|
||||
else:
|
||||
# always 'promote' ansible_local
|
||||
all_vars = combine_vars(all_vars, wrap_var({'ansible_local': facts.get('ansible_local', {})}))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue