Fixing precedence order for new nonpersistent vars (set_fact/register)

These used to go in vars_cache, so merging them in after that as they
are "live" variables and the user would most likely want to see these
above anything else.
This commit is contained in:
James Cammarata 2015-09-11 12:24:44 -04:00
parent 49803509b4
commit df89f03627

View file

@ -206,7 +206,6 @@ class VariableManager:
if host_facts[k] is not None and not isinstance(host_facts[k], UnsafeProxy):
host_facts[k] = UnsafeProxy(host_facts[k])
all_vars = combine_vars(all_vars, host_facts)
all_vars = combine_vars(all_vars, self._nonpersistent_fact_cache.get(host.name, dict()))
except KeyError:
pass
@ -252,6 +251,7 @@ class VariableManager:
if host:
all_vars = combine_vars(all_vars, self._vars_cache.get(host.get_name(), dict()))
all_vars = combine_vars(all_vars, self._nonpersistent_fact_cache.get(host.name, dict()))
all_vars = combine_vars(all_vars, self._extra_vars)