On Tuesday, October 15, 2013 12:52:39 AM UTC-5, David Schmitt wrote: > > On 14.10.2013 16:16, jcbollinger wrote: > > So the proposed solution at this point is: > > - enable an implicit data-binding lookup against the hiera-puppet > > backend for a value of 'classname::variable' in the file > > 'modules/classname/manifests/params.pp', which simplifies class > > definition and provides consistency with other hiera backends. As a > > module author, you'd still leave your logic for variables in > > params.pp, but they'd be implicitly looked up via data bindings as > > the class is declared, after consulting site-wide hiera. > > > > > > > > Do I understand correctly that you set out to get rid of the ::params > > class pattern, but now you favor an approach that depends on that > > pattern? Why is that better than being more general: enable an implicit > > lowest-priority hierarchy level for values of form > > 'modulename::variable', drawing on data from per-module data files such > > as modules/modulename/data.yaml? > > AIUI, prototyping revealed that many params classes contain logic that > cannot be expressed in .yaml to calculate default values. Making the > fallback lookup check the params class, the logic can be preserved while > avoiding verbose boilerplate code like the params_lookup calls in > Alessandro's modules. > >
I'm not saying that categorically getting rid of ::params classes is a viable target. In fact, I don't really understand why it was ever an objective in the first place. On the other hand, I don't see why it makes sense for Puppet to give special significance to that pattern, either. A more general data-in-modules feature such as I describe would give users the option to avoid ::params classes in some cases, and I'm inclined to think that it would be easier to implement, to understand, and to use. 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. For more options, visit https://groups.google.com/groups/opt_out.