On 30 Jan 2015 14:09, "leam hall" <leam...@gmail.com> wrote:
>
> :merge_behavior: deep
See https://docs.puppetlabs.com/hiera/1/lookup_types.html#deep-merging-in-hiera--120. In particular you probably want 'deeper' not 'deep' behavior.
Matt.
On Friday, January 30, 2015 at 12:11:20 PM UTC-5, Matthew Burgess wrote:
On 30 Jan 2015 14:09, "leam hall" <leam...@gmail.com> wrote:
>
> :merge_behavior: deepSee https://docs.puppetlabs.com/hiera/1/lookup_types.html#deep-merging-in-hiera--120. In particular you probably want 'deeper' not 'deep' behavior.
Matt.
Hey Matt, good catch. However, I changed to deep_merge in hiera.yaml [...]
:merge_behavior: deeper
I think we have the deep_merge gem installed:
/opt/puppet/lib/ruby/gems/1.9.1/gems/deep_merge-1.0.0
Not sure if the gems just get picked up or have to be called specifically.
/var/lib/hiera/node/remotenode.example.com.yaml
/var/lib/hiera/sandbox.yaml
hiera -a ntp_servers environment=sandbox
hiera --array ntp_servers environment=sandbox fqdn=remotenode.example.com
John
Hey John, thanks!
To add to your points, I'm referencing
https://docs.puppetlabs.com/hiera/1/lookup_types.html#array-merge
Your recommended Hiera command works fine on the master. Thanks! All
NTP servers show up.
However, they are not getting put into the ntp.conf file. I've
modified both the sandbox and remotenode json files to add extra
servers. The new servers show up in a hiera call on the puppet master
but are not showing up in the remotenode ntp config file.
Back to trouble-shooting...
And on that note I moved the
$servers = hiera('ntp_servers')
to
$servers = hiera_array('ntp_servers')
and resolved the issue. Woo-hoo!