Hiera hierarchy question

33 views
Skip to first unread message

twm...@gmail.com

unread,
May 10, 2014, 1:26:48 PM5/10/14
to puppet...@googlegroups.com
I have the following Hiera.yaml

---
:backends:
  - yaml
:hierarchy:
  - defaults
  - "%{clientcert}"
  - "%{environment}"
  - "users/%{usertype}"
  - global

:yaml:
  :datadir:

The usertype variable is defined in my Foreman parameters and is different for each host group type. 

The idea is that the user list for each host group type will be in a separate file in a subdirectory. 

However in order to get files of the name  "users/%{usertype}" I needed to create files in the base hiera directory with contents

--- 

to make them valid yaml files. 

Only once I did that did things work as expected. I am not sure why though. This can be useful now that I think about it, but it was unexpected. 

Terrence



Felix Frank

unread,
May 26, 2014, 9:26:42 AM5/26/14
to puppet...@googlegroups.com
Hi,

I don't really understand the problem.

What file did you need to create before you could use what other file?

Thanks,
Felix
Reply all
Reply to author
Forward
0 new messages