diff --git a/lib/ansible/playbook/play.py b/lib/ansible/playbook/play.py index 8d81424f09e..47bfd79b0b4 100644 --- a/lib/ansible/playbook/play.py +++ b/lib/ansible/playbook/play.py @@ -115,8 +115,8 @@ class Play(object): _tasks = ds.pop('tasks', []) _handlers = ds.pop('handlers', []) - temp_vars = utils.merge_hash(self.vars, self.vars_file_vars) - temp_vars = utils.merge_hash(temp_vars, self.playbook.extra_vars) + temp_vars = utils.combine_vars(self.vars, self.vars_file_vars) + temp_vars = utils.combine_vars(temp_vars, self.playbook.extra_vars) ds = template(basedir, ds, temp_vars) ds['tasks'] = _tasks @@ -632,9 +632,9 @@ class Play(object): dirname = os.path.dirname(original_file) # temp vars are used here to avoid trampling on the existing vars structures - temp_vars = utils.merge_hash(self.vars, self.vars_file_vars) - temp_vars = utils.merge_hash(temp_vars, mv) - temp_vars = utils.merge_hash(temp_vars, self.playbook.extra_vars) + temp_vars = utils.combine_vars(self.vars, self.vars_file_vars) + temp_vars = utils.combine_vars(temp_vars, mv) + temp_vars = utils.combine_Vars(temp_vars, self.playbook.extra_vars) include_file = template(dirname, tokens[0], temp_vars) include_filename = utils.path_dwim(dirname, include_file) diff --git a/lib/ansible/runner/__init__.py b/lib/ansible/runner/__init__.py index 7a693cc8d01..15845c6929a 100644 --- a/lib/ansible/runner/__init__.py +++ b/lib/ansible/runner/__init__.py @@ -608,7 +608,7 @@ class Runner(object): def get_combined_cache(self): # merge the VARS and SETUP caches for this host combined_cache = self.setup_cache.copy() - return utils.merge_hash(combined_cache, self.vars_cache) + return utils.combine_vars(combined_cache, self.vars_cache) def get_inject_vars(self, host): host_variables = self.inventory.get_variables(host, vault_password=self.vault_pass)