Hiera layers
Hiera has been discussed just in the context of the levels in a single hierarchy but there are three layers of hierarchy, each of which contains its own configuration of levels. When a lookup is performed by Puppet as part of a Puppet run, it will look through each of these layers, examining the levels of hierarchy within each.
The global layer is the first layer and is configured by default in $confdir/hiera.yaml
, usually /etc/puppetlabs/puppet/hiera.yaml
. Hiera version 3 only works at this layer, and its existence is more just a leftover for compatibility purposes. Puppet’s documentation suggests its only purpose should be for Hiera 3 compatibility and acting as a global override, but we would advise you to not use it at all since it exists outside of the code deployment and control processes, which will be reviewed in Chapter 11. This would leave control of the file localized to the Puppet server, which would only be desirable if you wanted to step around...