mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Deep merge of pillar lists
This commit is contained in:
parent
b0196fccb7
commit
d030e289b3
1 changed files with 3 additions and 0 deletions
|
@ -42,6 +42,9 @@ def update(dest, upd, recursive_update=True):
|
|||
and isinstance(val, collections.Mapping):
|
||||
ret = update(dest_subkey, val)
|
||||
dest[key] = ret
|
||||
elif isinstance(dest_subkey, list) \
|
||||
and isinstance(val, list):
|
||||
dest[key] = dest.get(key, []) + val
|
||||
else:
|
||||
dest[key] = upd[key]
|
||||
return dest
|
||||
|
|
Loading…
Add table
Reference in a new issue