found in cloud-init documentation. If no mergers have been specified, entries will be recursively added, but no values get replaced if they already exist. Functionally, this means that the highest priority keys must be specified first. Example: a = { "a": 1, "b": 2, "c": [1, 2, 3], "d": { "a": 1, "b": 2, }, } b = { "a": 10, "c": [4], "d": { "a": 3, "f": 10, }, "e": 20, } mergemanydict([a, b]) results in: { 'a': 1, 'b': 2, 'c': [1, 2, 3], 'd': { 'a': 1, 'b': 2, 'f': 10, }, 'e': 20, } )