O'Reilly logo

Troubleshooting Puppet by Thomas Uphill

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Hiera

Hiera is great for the organization of the data that is used to deploy nodes. If you create a hierarchy that accurately describes your infrastructure, you can achieve great reductions in complexity. Debugging can be a pain, though. When debugging, you need to know the fact values that were used to retrieve the Hiera values. In this section, we'll work through an example of how a Hiera value can be changed, depending on the values returned by Facter.

For this example, we will configure Hiera with a custom hierarchy and then use the values from Facter on a node to perform lookups with the command-line Hiera tool:

  1. Configure Hiera with the following hierarchy in hiera.yaml:
    :hierarchy: - defaults - hosts/"%{hostname}" - environments/"%{environment}" ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required