summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Mclean <alexandre.mclean@ubisoft.com>2016-02-24 22:54:23 -0500
committerAlexandre Mclean <alexandre.mclean@ubisoft.com>2016-02-24 22:54:23 -0500
commit0358d473ba1dc2c88d0e0b71e721b51a4eed92a5 (patch)
tree452d3410573575453669edbbe2c3dbc744a0833e
parent4eff3d5dc184eed37e9037167d574b13fa8893bf (diff)
downloadansible-0358d473ba1dc2c88d0e0b71e721b51a4eed92a5.tar.gz
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
-rw-r--r--lib/ansible/runner/__init__.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/ansible/runner/__init__.py b/lib/ansible/runner/__init__.py
index 5b02a9d8f2..f29bd36f06 100644
--- a/lib/ansible/runner/__init__.py
+++ b/lib/ansible/runner/__init__.py
@@ -611,6 +611,7 @@ class Runner(object):
# 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(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)
# remove bad variables from the module vars, which may be in there due