Last active
April 7, 2017 18:24
-
-
Save oranenj/d92a40d6d2e1386d47f3f4d8427a5ab0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#hiera.yaml | |
--- | |
version: 5 | |
defaults: | |
datadir: data | |
data_hash: yaml_data | |
hierarchy: | |
- name: test 1 | |
path: test1.yaml | |
- name: test 2 | |
path: test2.yaml | |
#test1.yaml | |
--- | |
classes: | |
- test1bar | |
- test1foo | |
- test1quuz | |
- --test2bar | |
#test2.yaml | |
classes: | |
- 'test2bar' | |
- 'test2foo' | |
- 'test2quuz' | |
- '--test1bar' | |
$ puppet lookup --hiera_config $PWD/hiera.yaml classes --merge deep --knock-out-prefix "--" --merge-hash-arrays --explain | |
Searching for "classes" | |
Global Data Provider (hiera configuration version 5) | |
Using configuration "/home/oranenj/testcase/hiera.yaml" | |
Merge strategy deep | |
Options: { | |
"sort_merge_arrays" => false, | |
"merge_hash_arrays" => true, | |
"knockout_prefix" => "--" | |
} | |
Hierarchy entry "test 1" | |
Path "/home/oranenj/testcase/data/test1.yaml" | |
Original path: "test1.yaml" | |
Found key: "classes" value: [ | |
"test1bar", | |
"test1foo", | |
"test1quuz" | |
<!------------------- No --test2bar? | |
] | |
Hierarchy entry "test 2" | |
Path "/home/oranenj/testcase/data/test2.yaml" | |
Original path: "test2.yaml" | |
Found key: "classes" value: [ | |
"test2bar", | |
"test2foo", | |
"test2quuz", | |
"--test1bar" | |
] | |
Merged result: [ | |
"test2foo", | |
"test2quuz", | |
<!---------------------- No test2bar ??? | |
"--test1bar", <!---------------------- but why is this here? | |
"test1bar", | |
"test1foo", | |
"test1quuz" | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment