On Thursday, April 18, 2013 3:42:32 PM UTC-5, blalor wrote:
>
> When you use the hiera() function, you ate by definition not doing 
> automatic param lookup. :-) whatever you put in for the first argument is 
> the key that will be looked up via hiera verbatim. If you leave the class 
> parameter without a default and instantiate it without a value, puppet will 
> prefix the name of the class to the param name with double colons and use 
> that as the lookup key in hiera. 
>
>
So, yes, the main issue here is that the keys in your hiera data files must 
match the ones by which Puppet attempts to look up the data.  The keys are 
opaque to hiera, and the context of each lookup nearly so.  If you want to 
lookup key 'puppet::puppetservertest' then that key must appear in the data 
-- it is a different key from 'puppetservertest', regardless of where the 
hiera() call appears.

Moreover, I wanted to point out that, contrary to Brian's implication, 
automated class parameter binding is independent of whether parameters have 
explicit default values.  If you do not bind a parameter's value via a 
class's declaration (and you shouldn't) then Puppet attempts to look up a 
value for it via hiera, regardless of whether an explicit default value is 
declared by the class.  Only if the hiera lookup fails is an explicit 
default used.


John

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to