Puppet: Setting up heira on RHEL 7.0

From Define Wiki
Revision as of 11:33, 7 July 2015 by Michael (talk | contribs) (Created page with "== Create the hiera Config File == File: /etc/puppet/hiera.yaml - symlink to /etc/heira/heira.yaml <syntaxhighlight> --- :backends: - yaml :hierarchy: - "%{::timezone}" - "%{:...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Create the hiera Config File

File: /etc/puppet/hiera.yaml - symlink to /etc/heira/heira.yaml

---
:backends:
   - yaml
 
:hierarchy:
  - "%{::timezone}"
  - "%{::osfamily}"
  - "%{::network}"
  - common
 
:yaml:
  :datadir: /etc/puppet/hieradata/

Add the lines to the manifests

node default {
     include  sudo
}

hiera_include('classes')

Create the data directory

Create the folder defined in the hirea.yaml file. In that folder create a file for each fact you want - for example for the OS Redhat:

[root@puppet ~]# cat /etc/puppet/hieradata/Redhat.yaml 
---
sshservicename: sshd

classes:
        -base
        -security