mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 21:00:22 -07:00
Lots of fixes for integration test bugs
This commit is contained in:
parent
a9712bb0fb
commit
b520d5bc60
16 changed files with 165 additions and 117 deletions
|
@ -245,6 +245,9 @@ class VariableManager:
|
|||
all_vars['omit'] = self._omit_token
|
||||
|
||||
# make vars self referential, so people can do things like 'vars[var_name]'
|
||||
copied_vars = all_vars.copy()
|
||||
if 'hostvars' in copied_vars:
|
||||
del copied_vars['hostvars']
|
||||
all_vars['vars'] = all_vars.copy()
|
||||
|
||||
#CACHED_VARS[cache_entry] = all_vars
|
||||
|
|
|
@ -39,6 +39,6 @@ class HostVars(dict):
|
|||
host = self._inventory.get_host(host_name)
|
||||
result = self._vars_manager.get_vars(loader=self._loader, play=self._play, host=host)
|
||||
templar = Templar(variables=result, loader=self._loader)
|
||||
self._lookup[host_name] = templar.template(result)
|
||||
self._lookup[host_name] = templar.template(result, fail_on_undefined=False)
|
||||
return self._lookup[host_name]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue