On Jun 28, 1:07 pm, Alan Barrett <a...@cequrux.com> wrote: > > Another approach is to do everything with node inheritance > > Common opinion seems to be that node inheritance should be avoided.
Just a comment about this "common opinion". Given the fact that there's not the "right" way but the most fitting one according to circumstances. Given the fact that external node tools may be a good way to manage nodes and their variables, but may not appeal everbody. Given that extlookup does what it promises and avoids variables scoping madness. Given the fact that you can use facts to set variables (but I don't think it's sane to set ANY kind of variable with facts) I keep on considering the node's inheritance approach a viable, working, flexible and even elegant solution to variables assignements to nodes. Just there are some point/precautions to consider: - Include classes only at host-node level and set/override variables wherever you want at step-nodes level (and this gives great flexibility) - Set in classes only local variables , not "environment" variables that are used by other classes. - If you really need to set in a class variables that are used by other classes/modules use dedicated classes where you only set variables (apache::params, apache:settings or whatever) and then include these classes in all the classes that use the variables defined therein and call the variables using their "absolute" name ( "${facility::params::ldap_server}" ) . - Avoid, if possible to use inheritance in classes, and if you really need to inherit classes beware of scoping hells and prefer the inclusion of these "parameter" classes, where possible. - Consider that variables set using their "absolute namespace" have to be referred in classes with brackets and quotes ( $facility::ldap_server may not work) and that you can't use them in templates (quick workaround is to reassign a variable inside a class: $ {ldap_server}" = ${facility::ldap_server}" ) My 5 cents Al PS: Still open to discussion -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.