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

Additional Hiera backends


The possibility of creating and adding different backends where data is to be stored is one of the strong points of Hiera as it allows storing Puppet data in any possible source.

This allows integrations with existing tools and gives more options to provide data in a safe and controlled way, for example, a custom web frontend or a CMDB.

Let's review some of the most interesting backends that exist.

The hiera-file backend

The hiera-file backend (https://github.com/adrienthebo/hiera-file) conceived by Adrien Thebo to manage a type of data that previously couldn't be stored in a sane way in Hiera, that is, plain files.

To install it, just clone the previous git repository in modulepath or use its gem as follows:

gem install hiera-file

We configure it by specifying the file backend, the hierarchy setting we want, and the datadir path where our files are placed:

---
:backends:
  - file
:hierarchy:
  - "fqdn/%{fqdn}"
  - "role/%{role}"
  - "common"
:file:
  :datadir: /etc...