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
About the Author
About the Reviewers

Data in modules

We have already mentioned the data in the modules feature and its long and difficult path inside Puppet in Chapter 5, Using and Writing Reusable Modules.

At the moment of writing, the feature is still not released on the core Puppet; however, it's expected for Puppet 4.

The implementation details are still not defined, but for modules' authors, the usage patterns should be similar to the ones suggested by R.I.Pienaar in his experimental module-based proposal, which can be found at

The basic idea is that all the internal variables of a module and, where needed, the default values of parameters should be based on a Hiera YAML backend directly placed inside the module, with a module-specific hierarchy that does not interfere with users' local hierarchies.

Basically, we can define the hierarchy to manage the module data in our module's data/hiera.yaml file:

    - "osfamily/%{::osfamily}"
    - common

Such a (simple...