Skip to content

Hiera hierarchy module for templating `hiera.yaml`

Notifications You must be signed in to change notification settings

yo61/hunner-hiera

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hiera Puppet

Description

This module configures Hiera for Puppet.

Usage

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/hieradata

About

Hiera hierarchy module for templating `hiera.yaml`

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Puppet 100.0%