Combining hashes/dictionaries
Theansible.builtin.combinefilter allows hashes to be merged. For example, the following would override keys in one hash:
The resulting hash would be:
The filter can also take multiple arguments to merge:
In this case, keys indwould override those inc, which would override those inb, and so on.
The filter also accepts two optional parameters:recursiveandlist_merge.
Ifrecursive=False(the default), nested hash aren’t merged: