Skip to content

Latest commit

 

History

History
41 lines (29 loc) · 1.17 KB

config_file_hiera.markdown

File metadata and controls

41 lines (29 loc) · 1.17 KB
layout title canonical
default
Config Files: hiera.yaml
/puppet/latest/config_file_hiera.html

The hiera.yaml file is used to configure Hiera, which Puppet can use to look up data.

Location

The hiera.yaml file is located at $codedir/hiera.yaml by default. Its location is configurable with the hiera_config setting.

When Puppet loads Hiera, it will use its own Hiera config file instead of the global one (which is usually located at /etc/hiera.yaml). If needed, you can point the hiera_config setting at the global Hiera config.

The location of the codedir depends on your OS. See the codedir documentation for details.

Example

---
:backends:
  - yaml
  - json
:yaml:
  :datadir: /etc/puppetlabs/code/hieradata
:json:
  :datadir: /etc/puppetlabs/code/hieradata
:hierarchy:
  - "%{clientcert}"
  - "%{datacenter}"
  - "%{osfamily}"
  - common

Format

See the Hiera documentation for full details about the hiera.yaml file.