Lots of fixes for integration test bugs

This commit is contained in:
James Cammarata 2015-07-10 01:53:59 -04:00
commit b520d5bc60
16 changed files with 165 additions and 117 deletions

View file

@ -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

View file

@ -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]