This module configures Hiera for Puppet.
This class will write out a hiera.yaml file in either /etc/puppetlabs/puppet/hiera.yaml or /etc/puppet/hiera.yaml (depending on if the node is running Puppet Enterprise or not).
class { 'hiera':
backends => [
{ 'yaml' => { 'datadir' => '/etc/puppet/hieradata' } },
],
hierarchy => [
'%{environment}/%{calling_class}',
'%{environment}',
'common',
],
}The resulting output in /etc/puppet/hiera.yaml:
---
:backends:
- yaml
:logger: console
:hierarchy:
- "%{environment}/%{calling_class}"
- "%{environment}"
- common
:yaml:
:datadir: /etc/puppet/hieradataEverything you need to know about testing this module is explained in
TESTING.md.
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request
