Book Image

Extending Puppet

By : Alessandro Franceschi
Book Image

Extending Puppet

By: Alessandro Franceschi

Overview of this book

Table of Contents (21 chapters)
Extending Puppet
Credits
Foreword
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Installing and configuring Hiera


From Puppet 3.x, Hiera has been officially integrated, and it is installed as a dependency when we install Puppet.

On Puppet 2.x, we need to install Hiera separately on the node where the Puppet Master resides: we need both the hiera and hiera-puppet packages, either via the OS native packaging system or via gem.

Hiera is not required on the clients unless they operate in a Masterless setup.

Its configuration file is hiera.yaml, and its path depends on how it is invoked, which can be either of the following ways:

  • When invoked from Puppet, the path will be /etc/puppet/hiera.yaml (/etc/puppetlabs/puppet/hiera.yaml for Puppet Enterprise)

  • When invoked from the CLI or when used within Ruby code, the path is /etc/hiera.yaml

It makes sense to create a symlink, and be sure to always use and edit the same file using the following command:

ln -s /etc/hiera.yaml /etc/puppet/hiera.yaml

The file is a YAML hash, where the top-level keys are Ruby symbols with a colon (:) prefix...