On Monday, February 9, 2015 at 10:37:39 AM UTC-6, Christopher Wood wrote:
 

> I'm dealing with a config file template where most options are always 
> turned off. I'm also trying to get our puppet agent runs to fail with 
> catalog compilation errors if they can't look up a hiera value, so there 
> are no default values in the class parameters. (Exploring if catalog 
> compilation failure is safer than the possibility of populating a config 
> with default values.) 
>
> If I could list a bunch of obvious 'undef' style items in hiera that might 
> be handier than listing 'false', given that the meaning of 
> 'configitem=false' is different in this config than an absent configitem. 
>
>
You're having trouble because you're being inconsistent.  If it is 
meaningful and supported for a class parameter to be absent, then why are 
you trying to force it to be present in the data?  On the other hand, if 
you mean to force a value to be specified for the parameter, then why are 
you trying to affirmatively specify no value?

Hiera aside, I don't much care for your design here.  Either allow the 
parameter to be unspecified, including via Hiera, or designate an actual 
value the class parameter can take to specify that the corresponding config 
option is to be omitted from the target file ("absent" would probably be 
the conventional choice for that).


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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/8c7bf563-8155-483b-921e-9c2ee51f0c80%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to