Replies: 2 comments
-
I was able to figure it out this way, but I'm not certain it will 100% prioritize the items found in the rules array of the host.yaml file. |
Beta Was this translation helpful? Give feedback.
-
Take a look here for a similar example: https://mikefarah.gitbook.io/yq/operators/multiply-merge#merge-arrays-of-objects-together-matching-on-a-key |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to figure out how to merge two yaml files into one and combine the "rules" array but deduplicate items based on the identifier keeping the value in the host.yaml file.
global.yaml
host.yaml
Desired Output
I've tried a couple of things but can't seem to figure out exactly what I'm trying to do.
Beta Was this translation helpful? Give feedback.
All reactions