1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

properly combine vars if merge is set

hash_behaviour = merge now also applies to include vars
This commit is contained in:
Brian Coca 2016-02-12 00:49:25 -05:00
parent c485981d1a
commit a327420b67

View file

@ -600,8 +600,10 @@ class VariableManager:
'''
Sets a value in the vars_cache for a host.
'''
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]:
self._vars_cache[host_name][varname] = combine_vars(self._vars_cache[host_name][varname], value)
else:
self._vars_cache[host_name][varname] = value