Fix bug where extra vars highest precedence is violated when used inside an interpolation within another variable

Extra vars lose their precedence when they overwrite a variable inside another variable interpolation structure.

Fixes #10896
This commit is contained in:
Alexandre Mclean 2016-02-24 22:54:23 -05:00
parent 4eff3d5dc1
commit 0358d473ba

View file

@ -611,6 +611,7 @@ class Runner(object):
# since some of the variables we'll be replacing may be contained there too # since some of the variables we'll be replacing may be contained there too
module_vars_inject = utils.combine_vars(host_variables, combined_cache.get(host, {})) module_vars_inject = utils.combine_vars(host_variables, combined_cache.get(host, {}))
module_vars_inject = utils.combine_vars(self.module_vars, module_vars_inject) module_vars_inject = utils.combine_vars(self.module_vars, module_vars_inject)
module_vars_inject = utils.combine_vars(module_vars_inject, self.extra_vars)
module_vars = template.template(self.basedir, self.module_vars, module_vars_inject) module_vars = template.template(self.basedir, self.module_vars, module_vars_inject)
# remove bad variables from the module vars, which may be in there due # remove bad variables from the module vars, which may be in there due