Support alternative variable overrides
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
craton |
New
|
Undecided
|
Unassigned |
Bug Description
Craton's variable override model is based on ChainMap (https:/
However, this is not the only choice. Instead the override can be a merge: eg for a list/set, the result is effectively a union of parent and child lists/sets. For two dicts, parent and child, this could be the same as doing parent.
There are some nuances: what if the collections are not the same type? For the list case, do the parent's items come first? Are duplicates removed?
One possibility is to make this configurable for a given namespace like ansible/, and follow any desired conventions for that namespace.
Any such work should probably subclass ChainMap, but it should otherwise ducktype like a ChainMap.