Re: [Puppet Users] Re: Announce: Puppet 3.3.0 Available

Henrik Lindberg
Sun, 15 Sep 2013 19:45:26 -0000

On 2013-15-09 3:11, William Van Hevelingen wrote:
> Hi Henrik or Eric,
>
> Is it possible to error on failed lookups? This is useful for replacing
> the fail(''osfamily not supported'') lines in most
params.pp files. Ryan
> mentioned the same thing in the ticket and I wasn''t sure if it was
resolved.
>
> It currently returns undef if the value is not found.
>
>
It should error if a parameterized class does not get a value for a
parameter (and it has no default value), but it does not do that for an
explicit lookup.

It has been brought up earlier that it is a bit klunky to lookup a value
and use a default as a check is needed. I can imagine changing the
lookup signature to take name, type and default. If no default is given
it could be made to raise an error if name does not exist.

Regards
- henrik