diff --git a/lib/ansible/runner/__init__.py b/lib/ansible/runner/__init__.py index cd09993e58..39e8a9378a 100644 --- a/lib/ansible/runner/__init__.py +++ b/lib/ansible/runner/__init__.py @@ -573,7 +573,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