Note: We’ve released a major update to Hiera called Hiera 5.
Hiera 5 is built into Puppet 4.9 and higher, and includes features like per-environment hierarchies, module data, simplified custom backends, improved debugging with
puppet lookup --explain, and more.
As part of this update, we’ve moved Hiera’s documentation into the Puppet reference manual. Once you’ve upgraded to Puppet 4.9 or higher, see the following pages for more info about the new Hiera:
Note: If you are using Puppet 3 or later, you probably already have Hiera installed. You can skip these steps, and go directly to configuring Hiera.
hiera-puppetpackage; see below.
If you are using Hiera with Puppet, you should install it on your puppet master server(s); it is optional and unnecessary on agent nodes. (If you are using a standalone puppet apply site, every node should have Hiera.)
hieraPackage or Gem
hiera package, using Puppet or your system’s standard package tools.
Note: You may need to enable the Puppet Labs package repos first.
$ sudo puppet resource package hiera ensure=installed
If your system does not have native Hiera packages available, you may need to install it as a Rubygem.
$ sudo gem install hiera
If you are using Hiera with Puppet 2.7.x, you must also install the
hiera-puppet package on every puppet master.
$ sudo puppet resource package hiera-puppet ensure=installed
Or, on systems without native packages:
$ sudo gem install hiera-puppet
Note: Puppet 3 does not need the
hiera-puppetpackage, and may refuse to install if it is present. You can safely remove
hiera-puppetin the process of upgrading to Puppet 3.
That’s it: Hiera is installed. Next, configure Hiera with its
hiera.yaml config file.