Chapter 6. Managing data with Hiera

 

What you don't know can't hurt me.

 
 --Edward S. Marshall

In this chapter, you will learn why it's useful to separate your data and code. You will see how to set up Puppet's built-in Hiera mechanism, how to use it to store and query configuration data, including encrypted secrets such as passwords, and how to use Hiera data to create Puppet resources.

Managing data with Hiera

Why Hiera?

What do we mean by configuration data? There will be lots of pieces of information in your manifests which we can regard as configuration data: for example, the values of all your resource attributes. Look at the following example:

package { 'puppet-agent': ...

Get Puppet 5 Beginner's Guide - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.