>> On Jan 26, 2012, at 6:19 AM, jcbollinger wrote: >>> For the most part, I think this reflects the difficulty of the >>> underlying problem more than any inadequacy of Puppet. If multiple >>> independent subsystems place different demands on the same resources, >>> then you have a mess to sort out no matter what tools you use to do >>> it. On the other hand, if multiple independent subsystems place the >>> same demands on certain resources, then that's pretty easy to handle, >>> with Puppet or otherwise.
> On Jan 26, 1:22 pm, Jo Rhett <jrh...@netconsonance.com> wrote: >> I disagree. I have about 12 different modules, any combination of which may >> be applied to a given system, all of which need to ensure that sshd is >> installed and running on a system. They all have a single, common need. >> However, some of those modules also run on systems where we don't need to >> ensure that sshd is running. The solution to this is an interlocking maze >> of module dependancies which is downright terrifying. > On Feb 1, 2012, at 6:26 AM, jcbollinger wrote: > You seem to be describing my former case rather than my latter one, at > least with respect to nodes that don't need (and apparently don't > *want*) sshd to be running. All the same, were I faced with a problem > of that sort I would probably take this approach: > > 1) Factor the ssh[d] management into its own module. > 2) Avoid using any parameterized classes in the ssh module, or at > least in its external interface. > 3) Instead, have the ssh module use external data to determine node-by- > node or role-by-role whether sshd should be running. > 4) Make other modules 'include' or 'require' the appropriate classes > of the ssh module, as needed. > > With that, all the modules depend on the ssh module, but they do not > depend on each other, at least not for this purpose. It's clean and > simple. Enabling that result is the overarching benefit of the > ability to assign the same class to a node multiple times. That simply doesn't work, because you are basically asking the ssh module to have all the logic inside it for whether or not certain other classes need it. As expressed, it would require duplication of all the if/then in the other modules to be duplicated within this module. That's simply not practical in a large or diversified team. -- 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.