Last active
June 8, 2018 20:17
-
-
Save gabe-sky/61b4be19063c9df9c939ec295c6669eb 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
Compare this lookup: | |
------------->8------- cut here ------->8------- | |
# nodes/rizzo.puppetlabs.vm | |
--- | |
hashme::myhash: | |
flarghies: | |
smarghies: | |
- 'a' | |
- 'b' | |
# common.yaml | |
--- | |
hashme::myhash: | |
flarghies: | |
smarghies: | |
- 'b' | |
- 'c' | |
klarghies: | |
- 'f' | |
# hashme/manifests/init.pp | |
class hashme { | |
$myhash = lookup({ "name" => "hashme::myhash", | |
"merge" => "deep", | |
}) | |
notify { "${myhash}": } | |
} | |
------------->8------- cut here ------->8------- | |
To this deep_merge: | |
------------->8------- cut here ------->8------- | |
$hishash = { 'flarghies' => { smarghies => ['a','b'] } } | |
$herhash = { 'flarghies' => { | |
smarghies => ['b','c'], | |
'klarghies' => ['f'] | |
} | |
} | |
$ourhash = deep_merge($hishash,$herhash) | |
notify { "${ourhash}": } | |
------------->8------- cut here ------->8------- | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment