| Then there will be 2 merges. First a.yaml and b.yaml are merged:
classes merging ["--profiles::network", "network"] and ["profiles::application"]
|
Then that result is merged with common.yaml:
classes merging ["profiles::application", "network"] and ["profiles::motd", "profiles::network"]
|
The problem is as Thomas and Henrik described earlier. The anti-value "--profiles::network" is only applied during the first merge and is "lost" by the time the second merge takes place, so the value "profiles::network" is not removed/knocked out. This problem can also occur across environment and module layers. However, it is only triggered if there are multiple merges (once in the environment layer and again across layers). Also the issue won't occur if the key only occurs in two places in the hierarchy, since there's only one merge and the value and anti-value cancel each other. |