Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To configure hiera you might simply pull the latest version of the hiera.yaml file from github:

 

Code Block
titleConfigure hiera
root@bootstrap:~# mkdir /etc/puppetlabs/puppet/data
root@bootstrap:~# cd /etc/puppetlabs/puppet/data
root@bootstrap:/etc/puppetlabs/puppet/data# mkdir nodes
root@bootstrap:/etc/puppetlabs/puppet/data# touch common.yaml networking.yaml packages.yaml sensu.yaml users.yaml nodes/bootstrap.infra.skyhigh.iik.ntnu.no
root@bootstrap:/etc/puppetlabs/puppet/data# git init .
Initialized empty Git repository in /etc/puppetlabs/puppet/data/.git/puppet# wget https://github.com/ntnusky/profile/blob/infrastructure/files/puppet/hiera.yaml
   ...
2017-12-22 14:18:52 (334 KB/s) - 'hiera.yaml.1' saved [72001]
root@bootstrap:/etc/puppetlabs/puppet/data#puppet# git add .
root@bootstrap:/etc/puppetlabs/puppet/data# git commit -m "Initial import"

 

 

 

mv hiera.yaml.1 hiera.yaml

Next up is populating the hiearchi with information based on this wikipage.

Code Block
titleSet up hiera datafiles
root@bootstrap:~# mkdir /etc/puppetlabs/puppet/data
root@bootstrap:~# cd /etc/puppetlabs/puppet/data
root@bootstrap:/etc/puppetlabs/puppet/data# mkdir nodes
root@bootstrap:/etc/puppetlabs/puppet/data# touch common.yaml networking.yaml packages.yaml sensu.yaml users.yaml nodes/bootstrap.infra.skyhigh.iik.ntnu.no
root@bootstrap:/etc/puppetlabs/puppet/data# git init .
Initialized empty Git repository in /etc/puppetlabs/puppet/data/.git/
root@bootstrap:/etc/puppetlabs/puppet/data# git add .
root@bootstrap:/etc/puppetlabs/puppet/data# git commit -m "Initial import"