converting node inheritance to hiera

Posted by quickshiftin on Server Fault See other posts from Server Fault or by quickshiftin
Published on 2013-10-29T21:53:48Z Indexed on 2013/10/29 21:58 UTC
Read the original article Hit count: 267

Filed under:
|
|

I'm working on moving over a node inheritance tree to hiera. Presently working on the hierarchy. Prior to hiera, my nodes had a hierarchy as such

base
  pre-prod
    qa
      nodes
    staging
      nodes
    development
      nodes
  prod
    nodes

Now I'm trying to get the same tier with hiera. Starting out I have this

:hierarchy:
  - base
  - "%{environment}"
  - "%{clientcert}"

but I need another level to capture pre-prod and prod. My thought would be to add an entry to puppet.conf, something like

[agent]
realm = pre-prod

then

:hierarchy:
  - base
  - "%{realm}"
  - "%{environment}"
  - "%{clientcert}"

A couple of questions

  1. Are you allowed to place arbitrary properties into puppet.conf?
  2. Will hiera see the realm property?

© Server Fault or respective owner

Related posts about puppet

Related posts about hiera