From e85a9abe75a89db8e067a15f0323322ea93af7da Mon Sep 17 00:00:00 2001 From: James Cammarata Date: Wed, 4 Jun 2014 10:50:41 -0500 Subject: [PATCH] Fix order of merging variables for the combined cache Fixes #7598 --- lib/ansible/runner/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/runner/__init__.py b/lib/ansible/runner/__init__.py index 87ed947f929..5f321e47298 100644 --- a/lib/ansible/runner/__init__.py +++ b/lib/ansible/runner/__init__.py @@ -572,8 +572,8 @@ class Runner(object): # use combined_cache and host_variables to template the module_vars # we update the inject variables with the data we're about to template # since some of the variables we'll be replacing may be contained there too - module_vars_inject = utils.combine_vars(combined_cache.get(host, {}), host_variables) - module_vars_inject.update(self.module_vars) + 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 = template.template(self.basedir, self.module_vars, module_vars_inject) inject = {}