mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-26 22:51:23 -07:00
Revert "keep ansible_local as top level var, always present"
This reverts commit 97cb2016d8
.
It was causing issues downstream as facts seem to be merged back for
subsequent tasks. Will restore if I ever figure out how to avoid that.
This commit is contained in:
parent
a6ca849643
commit
00231c29ba
1 changed files with 0 additions and 11 deletions
|
@ -289,17 +289,6 @@ class VariableManager:
|
||||||
all_vars = combine_vars(all_vars, host_facts)
|
all_vars = combine_vars(all_vars, host_facts)
|
||||||
# always return namespaced facts
|
# always return namespaced facts
|
||||||
all_vars = combine_vars(all_vars, {'ansible_facts': host_facts})
|
all_vars = combine_vars(all_vars, {'ansible_facts': host_facts})
|
||||||
|
|
||||||
# push local to top namespace, ensure we always have, even if empty
|
|
||||||
if 'ansible_local' in all_vars['ansible_facts']:
|
|
||||||
all_vars.update({'ansible_local': all_vars['ansible_facts']['ansible_local']})
|
|
||||||
else:
|
|
||||||
all_vars.update({'ansible_local': {}})
|
|
||||||
|
|
||||||
# remove possible extra ansible_local from ansible_facts namespace
|
|
||||||
if 'ansible_local' in all_vars['ansible_facts']:
|
|
||||||
del all_vars['ansible_facts']['ansible_local']
|
|
||||||
|
|
||||||
except KeyError:
|
except KeyError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue