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

Chapter 2. Hiera

The history of Puppet is an interesting example of how best practices have evolved with time, following new usage patterns and contributions from the community.

Once people started to write manifests and express the desired state of their systems with Puppet's DSL, they found themselves placing custom variables and parameters that expressed various resources of their infrastructures (IP addresses, hostnames, paths, URLs, names, properties, lists of objects, and so on) inside the code used to create the needed resource types.

At times, variables were used to classify and categorize nodes (systems' roles, operational environments, and so on); at other times, facts (such as $::operatingsystem) were used to provide resources with the right names and paths according to the underlying OS.

Variables could be defined in different places; they could be set via an ENC, inside node declarations, or inside classes.

There wasn't (and actually, still there isn't) any strict rule on how and...