Book Image

Mastering Puppet

By : Thomas Uphill
Book Image

Mastering Puppet

By: Thomas Uphill

Overview of this book

Table of Contents (17 chapters)


Hiera allows you to create a hierarchy of node information. Using hiera, you can separate your variables and data from your modules. You start by defining what that hierarchy will be by ordering lookups in the main configuration file, hiera.yaml. The hierarchy is based on facts. Any fact can be used, even your own custom facts may be used. The values of the facts are then used as values for the YAML files stored in a directory, usually called hieradata. More information on hiera may be found on the Puppet Labs website at


Facts are case sensitive in hiera and templates; this could be important when writing your hiera.yaml script.

Configuring hiera

Hiera only needs to be installed on your worker nodes. Using the Puppet Labs repo, the package to install is hiera; our installation pulled down hiera-1.3.0-1.el6.noarch. The command-line hiera tool looks for the hiera configuration file, hiera.yaml, in /etc/hiera.yaml. Puppet will by default look for hiera...