From 29018cf2a70ae319a306a551774542ab0d011804 Mon Sep 17 00:00:00 2001 From: Chris Church Date: Mon, 12 May 2014 13:48:11 -0500 Subject: [PATCH] Correctly initialize combined_cache for hosts if setup is skipped Fixes #7364 --- lib/ansible/runner/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/runner/__init__.py b/lib/ansible/runner/__init__.py index feda312456e..aef43791a38 100644 --- a/lib/ansible/runner/__init__.py +++ b/lib/ansible/runner/__init__.py @@ -566,7 +566,7 @@ class Runner(object): # merge the VARS and SETUP caches for this host combined_cache = self.setup_cache.copy() - combined_cache.get(host, {}).update(self.vars_cache.get(host, {})) + combined_cache.setdefault(host, {}).update(self.vars_cache.get(host, {})) hostvars = HostVars(combined_cache, self.inventory, vault_password=self.vault_pass) # use combined_cache and host_variables to template the module_vars