> class foo:bar(
> $param1, # This enables you to provide 'param1' when instantiating
> the class,
> # and it enables auto-parameter-lookup for foo::bar::param1
> in Hiera.
> # if no value is given or found in Hiera, the value of
> $param1 will be undef.
>
> $param2='test' # This enables you to provide 'param2' when instantiating
> the class,
> # and it enables auto-parameter-lookup for foo::bar::param2
> in Hiera.
> # if no value is given or found in Hiera, the value of
> $param2 will be 'test'.
> ) { ... }
>
> In other words, specifying =<some value> after a parameter in the class
> parameter definition, will enable you to provide a default value that is used
> as a last resort.
Really? We just had to modify about 20 classes in our end because the hiera
values were *not* used when defaults were specified in the class definitions..
Is there some obscure option/setting we've inherited from puppet2/3 that we're
being bitten by?
And to Chadwick - sorry for the apparently bad advice :-)
/Eirik
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/35F60FFD-9962-4AA6-9685-6ABBB41F4E55%40anduin.net.
For more options, visit https://groups.google.com/d/optout.