I came across an issue where hiera command line tool returns a different
data to what puppet3.0 builtin hiera does.
When I say different data, I mean hiera tool returns an array of items
collected throughout the hierarchy, while hiera_array() called from within
a manifest returns an array of items from the very top level of hierarchy.
Here is my setup example:
- 'node_specific = foo'
- 'node_specific2 = foo2'
- 'common = foo'
- 'common2 = foo2'
That's what I get by running hiera tool on the puppet master:
# hiera -c /etc/puppet/hiera.yaml -a foo::conf environment='development'
["node_specific = foo", "node_specific2 = foo2", "common = foo", "common2 =
From within the manifest, I use as a parameter:
$conf = hiera_array('foo::conf')
and then I have a template which creates a file on a node:
<% conf.each do |item| -%>
<%= item %>
<% end -%>
.. so what this template create is the following content of a file on node1:
node_specific = foo
node_specific2 = foo2
The node is in development environment.
What am I doing wrong? Is this some kind of bug or intentional behavior of
puppet and hiera?
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/-/PgUdDVAFw9kJ.
To post to this group, send email to email@example.com.
To unsubscribe from this group, send email to firstname.lastname@example.org.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.