Only combine vars in include_vars if both are mappings

Fixes #15184
pull/4420/head
James Cammarata 2016-03-30 11:10:54 -04:00
parent c09e085480
commit 4fc0aadd84
1 changed files with 1 additions and 1 deletions

View File

@ -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