----- Original Message ----- > From: "Dan White" <[email protected]> > To: "puppet-users" <[email protected]> > Sent: Tuesday, June 16, 2015 9:09:54 PM > Subject: Re: [Puppet Users] Wanna see something scary ?
> From https://docs.puppetlabs.com/references/latest/function.html#hierainclude > > To use hiera_include, the following configuration is required: > > • A key name to use for classes, e.g. classes. > • A line in the puppet sites.pp file (e.g. > /etc/puppetlabs/puppet/manifests/sites.pp) reading hiera_include('classes'). > Note that this line must be outside any node definition and below any > top-scope > variables in use for Hiera lookups. > > (My italics) The documentation is certainly overstating the need for this, it works best that way in cases where people do like: node default { $stuff_in_the_hierarchy = "foo" hiera_include("x") } but once you understand that there really is no reason not to put it elsewhere. To be clear, all that hiera_include() does is: include(hiera_array("x")) neither hiera_array() or include() has issues with where they are run and they both behave in predictable ways when used in classes. I wrote hiera_include() because include() back in the day didnt take an array, thats all. The documentation is overstating it and people are reading too much into it :) -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/390611328.90197.1434528163071.JavaMail.zimbra%40devco.net. For more options, visit https://groups.google.com/d/optout.
