mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-03 17:23:09 +00:00
move hostvars.vars to vars
this fixes duplication under hostvars and exposes all vars in the vars dict which makes dynamic reference possible on 'non hostvars'
This commit is contained in:
@@ -259,8 +259,6 @@ class VariableManager:
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
all_vars['vars'] = all_vars.copy()
|
||||
|
||||
if play:
|
||||
all_vars = combine_vars(all_vars, play.get_vars())
|
||||
|
||||
@@ -343,6 +341,8 @@ class VariableManager:
|
||||
all_vars['ansible_delegated_vars'] = self._get_delegated_vars(loader, play, task, all_vars)
|
||||
|
||||
#VARIABLE_CACHE[cache_entry] = all_vars
|
||||
if task or play:
|
||||
all_vars['vars'] = all_vars.copy()
|
||||
|
||||
debug("done with get_vars()")
|
||||
return all_vars
|
||||
|
||||
Reference in New Issue
Block a user