Hello,

At the moment I do not use Hiera to store any config at all, but I want to.

Currently, I can use the variable "$mysettings::config::envtype" in my 
classes, as long as I put 'require mysettings::config' at the head of those 
classes.

In my environment, I use this variable to hold "PROD", "DEV", "PERFTEST", 
"QA", etc (It derives this from IP subnet).


I have this in my hiera.yaml file, which successfully pulls the data from, 
for example, the *os/RedHat.yaml* file when needed.
  - name: "OS defaults"
    path: "os/%{facts.os.family}.yaml"
    

    
How do I use my variable above in the same way? I've tried the below, and a 
number of other syntaxes, and can't get it working. ie. I want to retrieve 
config from the *envtype/DEV.yaml* file, but it's not returning anything.
  - name: "Envtype data"
    path: "envtype/%{'mysettings::config::envtype'}.yaml"
    

Apologies if this is explained in documentation, I have gone over it and 
it's just not clicking for me. Should I be doing it this way, should I be 
using custom facts, should I be doing something else?

I'm on Puppet PE v2017.1.0.

Thanks for any help.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/c569bc63-69b5-481c-8f38-7e3388ea49a3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to