Versions: puppet 2.7.18, hiera 0.3.0
I have encountered a problem that is completely counter intuitive to how I
thought hiera was meant to work. I have three levels in my hierarchy in the
following order:
- <node>.yaml (specific to the host)
- <datacentre>.yaml (we have multiple sites, this is info specific to the
site)
- common.yaml (applies to everything)
I noticed this problem while working round a DNS problem, needless to say I
had the following (ip addresses changes to protect the innocent) in the
<datacentre>.yaml:
dns_servers:
- '1.1.1.1'
- '2.2.2.2'
I wanted a specific host to use different DNS so in the <node>.yaml I added:
dns_servers:
- '3.3.3.3'
Now, when I do a hiera_array('dns_servers') I would expect that the
original array (1.1.1.1 and 2.2.2.2) would be overwritten with a single
value (3.3.3.3)...
As it turned out is concatenated the two arrays together, giving me
(1.1.1.1 and 2.2.2.2 and 3.3.3.3). Non-plussed I added another entry to the
common.yaml (4.4.4.4) and lo and behold it added that in as well giving
me (1.1.1.1 and 2.2.2.2 and 3.3.3.3 and 4.4.4.4).
I really did assume from the documentation that the hierarchy would be
obeyed and both <datacentre>.yaml and common.yaml would be ignored ... or
have I misunderstood how the system works?
Thanks
Josh
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/puppet-users/-/e-jCVgKPe6AJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.