Hiera is a built-in key-value configuration data lookup system, used for separating data from Puppet code.
Puppet’s strength is in reusable code. Code that serves many needs must be configurable: put site-specific information in external configuration data files, rather than in the code itself.
Puppet uses Hiera to do two things:
This is done via:
Hiera’s hierarchical look ups follow a “defaults, with overrides” pattern, meaning you specify common data one time, and override it in situations where the default won’t work.
Hiera uses Puppet’s facts to specify data sources, so you can structure your overrides to suit your infrastructure.
While using facts for this purpose is common, data-sources can also be defined without the use of facts.
Hiera supports JSON , YAML and EYAML files.