Location of hiera.yaml files

There are several hiera.yaml files in a typical deployment. Hiera uses three layers of configuration, and the module and environment layers typically have multiple instances.

The configuration file locations for each layer:

Layer Location Example
Global $confdir/hiera.yaml /etc/puppetlabs/puppet/hiera.yamlC:\ProgramData\PuppetLabs\puppet\etc\hiera.yaml
Environment <ENVIRONMENT>/hiera.yaml /etc/puppetlabs/code/environments/production/hiera.yamlC:\ProgramData\PuppetLabs\code\environments\production\hiera.yaml
Module <MODULE>/hiera.yaml /etc/puppetlabs/code/environments/production/modules/ntp/hiera.yamlC:\ProgramData\PuppetLabs\code\environments\production\modules\ntp\hiera.yaml

To change the location for the global layer’s hiera.yaml set the hiera_config setting in your puppet.conf file.

Hiera searches for data in the following order: global → environment → module. For more information, see Hiera configuration layers.

Related topics: codedir, Environments, Modules fundamentals.