From 4fc0aadd8448e762dd662f9b4940125ac5fd9a9f Mon Sep 17 00:00:00 2001 From: James Cammarata Date: Wed, 30 Mar 2016 11:10:54 -0400 Subject: [PATCH] Only combine vars in include_vars if both are mappings Fixes #15184 --- lib/ansible/vars/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/vars/__init__.py b/lib/ansible/vars/__init__.py index c95d25c5a32..361ab5670a0 100644 --- a/lib/ansible/vars/__init__.py +++ b/lib/ansible/vars/__init__.py @@ -605,7 +605,7 @@ class VariableManager: host_name = host.get_name() if host_name not in self._vars_cache: self._vars_cache[host_name] = dict() - if varname in self._vars_cache[host_name]: + if varname in self._vars_cache[host_name] and isinstance(self._vars_cache[host_name][varname], MutableMapping) and isinstance(value, MutableMapping): self._vars_cache[host_name][varname] = combine_vars(self._vars_cache[host_name][varname], value) else: self._vars_cache[host_name][varname] = value