On Apr 19, 2012, at 9:24 AM, Andrew Parker wrote:
> What do you do with inheritance (classes or nodes) wrt variables? Avoid?
> Using a lot? Have a specific pattern that you follow?
I have used inheritance for overriding an object -- since it's the only thing
that can accomplish that, but I found that trying to use inheritance basically
broke the brain of everyone else trying to use the modules. And frankly, even I
found Puppet's inheritance tricky at best. And I use it extensively in C++ and
Perl and Python, so it's not something I avoid everywhere. It seems to not
provide enough handles to be really useful, and nearly impossible to debug.
Puppet could very desperately use a debugging compiler -- attach as a given
node and output the streams which get one to the compiled catalog state. Show
every assignment, every override, everything.
> If you are 100% parameterized why do you need to reach for node-level
> variables? Shouldn't everything be a parameter to the class/define?
That simply wasn't always possible. I ran into a few situations which required
us to have node-level variables. I forget offhand, but it was definitely one
of those "Puppet is half way between Include and Class {} at this point, and
isn't good at either one" frustration points. I'll try to come up with examples.
--
Jo Rhett
Net Consonance : consonant endings by net philanthropy, open source and other
randomness
--
You received this message because you are subscribed to the Google Groups
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-dev?hl=en.