Commit aad128ba by James Tanner Committed by James Cammarata

Use combined cache for templating module vars

Fixes #6901
parent 942c3299
...@@ -552,12 +552,14 @@ class Runner(object): ...@@ -552,12 +552,14 @@ class Runner(object):
# fireball, local, etc # fireball, local, etc
port = self.remote_port port = self.remote_port
module_vars = template.template(self.basedir, self.module_vars, host_variables)
# merge the VARS and SETUP caches for this host # merge the VARS and SETUP caches for this host
combined_cache = self.setup_cache.copy() combined_cache = self.setup_cache.copy()
combined_cache.get(host, {}).update(self.vars_cache.get(host, {})) combined_cache.get(host, {}).update(self.vars_cache.get(host, {}))
# use combined_cache and host_variables to template the module_vars
module_vars_inject = utils.combine_vars(combined_cache.get(host, {}), host_variables)
module_vars = template.template(self.basedir, self.module_vars, module_vars_inject)
inject = {} inject = {}
inject = utils.combine_vars(inject, self.default_vars) inject = utils.combine_vars(inject, self.default_vars)
inject = utils.combine_vars(inject, host_variables) inject = utils.combine_vars(inject, host_variables)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment