> On 01/26/2012 08:14 PM, Jo Rhett wrote: >> One thing about a well-written piece of generic code is that it can be used >> in many environments. A lot of my modules do things like "do I have an >> external interface or am I behind the firewall?" and do different things >> based on those answers. Likewise, when dealing with software components you >> could be on a system dedicated to just that one component, or you could be >> on a Dev/QA box which has dozens of such components installed. The behavior >> calls for different actions there.
On Jan 27, 2012, at 1:05 AM, Felix Frank wrote: > what about custom facts, then? Trust me, I've used a lot of custom facts. This works great for acting on different information, it doesn't really help Puppet deal with diverse requirements. > Have you considered combining class inheritance with parameters? I've done a bit of class inheritance and I think this works great when I'm deeply tying together two bits I wrote. I don't believe that class inheritance works well for situations where two or three different teams are trying to express their needs in a simple way. > I have found that in many situations, it's extremely helpful to be able > to include an unparameterized base class to satisfy dependencies, and > allow nodes to include additional subclasses that take care of the gory > details. This is just moving the problem around. It doesn't change the fact that you have two diverse modules with two diverse sets of needs for the same resource, and you can't express that easily in puppet. You're just moving the problem from a-module and b-module to ssh:a-module-needs and ssh:b-module-needs. I'll admit that I haven't finished plunging the ocean for what you can do by virtualizing an object and then materializing it later, but all the commentary on other threads keeps saying that you shouldn't be using virtual objects to meet that need. -- 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 Users" group. To post to this group, send email to puppet-users@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.