On Tuesday, June 02, 2015 at 12:55 AM, jamese <james.eckers...@gmail.com> sent:
> If you use calling_class as part of the hierarchy in your hiera.yaml file, you
> can have files named after the calling class.
> 
> https://docs.puppetlabs.com/hiera/1/puppet.html#special-pseudo-
> variables
> 
> This would allow you to create a yaml file named after each class in
> question.
> 
> You can also use calling_module, but that probably wouldn't give the
> granularity that you want.


Hmm. That had been something that I looked at, but this bit in the 
documentation: 
"Note that these variables are effectively local scope, as they are 
pseudo-variables that only exist within the context of a specific class, and 
only inside of hiera. Therefore, they must be called as %{variable_name} and 
never %{::variable_name}. They are not top-scope."

Followed by: 
"Do not use local Puppet variables in Hiera’s hierarchy or data sources. Only 
use facts and ENC-set top-scope variables."

Led me to discard them as useful in constructing a hiera.yaml hierarchy. From 
your response (and the replies from Craig and John) it appears that I was 
incorrect to do so. Thanks!


-- 
Robert Davidson



-- 
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/1EE73329D6577F44A3C2FB0F7D4ACAE98CEFA274%40mbx-02.
For more options, visit https://groups.google.com/d/optout.

Reply via email to