Greetings all,
In the pre-hiera days, it was commonly recommended to write classes with
params like this:
class my_class::params {
$config_param = 'default value'
}
class my_class (
$config_param = $myclass:params::config_param
) inherits myclass::params {
...
}
However, now that much overriding, customising etc has moved into Hiera,
this ends up being very verbose, redundant and error-prone, especially
if there are a lot of parameters (to go into a config template, for
example). The same parameter name may end up in four different places in
common cases: hiera, params, class decl and the config template.
So I would like to know if people are still doing this as much as
possible. What is the remaining benefit in declaring defaults in params
rather than in the class declaration directly? Is there a more up to
date style guide that does away with the verbosity and duplication, or
is the old params class style still widely recommended?
Thanks for any suggestions,
-Taj.
--
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/5401FA70.9010101%40gmail.com.
For more options, visit https://groups.google.com/d/optout.