summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Church <chris@ninemoreminutes.com>2014-05-12 13:48:11 -0500
committerJames Cammarata <jimi@sngx.net>2014-05-21 14:55:24 -0500
commit29018cf2a70ae319a306a551774542ab0d011804 (patch)
tree122f60cc198c61e8b799894904fbf8c6688e0b59
parent9d8eee633d19c7a062ed5ced3412e6229ae3872e (diff)
downloadansible-29018cf2a70ae319a306a551774542ab0d011804.tar.gz
Correctly initialize combined_cache for hosts if setup is skipped
Fixes #7364
-rw-r--r--lib/ansible/runner/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ansible/runner/__init__.py b/lib/ansible/runner/__init__.py
index feda312456..aef43791a3 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