Michael, and Doug, On reading this thread it looks like there's a lot of frustration going on. There's a few questions that need answering. I'll list them below:
1) "how... do we make sure that resources get applied in a predictable order" (profanity elided) 2) Why does puppet manage dependencies the way it does? 3) How can I keep dependencies manageable? The answer to #1 is simple, and has been repeated. Use require/subscribe and/or before/notify. The answer to #2 is more complicated, and has been hashed over before on the list, but I'll comment that some people just don't like the dependency model in puppet. There are other tools out there that use a different model - personally I prefer Puppet's way. #3 can be answered "the same as you would in object-oriented development" - develop good abstractions and minimize your crossing of abstraction boundaries. It sounds like Doug's manifests don't follow these guidelines, as he says "Within the bootstrapped modules currently I have a horrible mess of unmaintainable requires => statements, that are just going to get harder to maintain as times goes on. I'm afraid to touch it now, for fear of what will break." Refactoring is in order. Let me know if I can clarify any of this. --Paul Lathrop On Mon, Nov 30, 2009 at 4:08 PM, Michael T. Halligan <[email protected]> wrote: > I think what Doug is trying to ask is, how the hell do we make sure that > resources get applied in a predictable order? > > > On Nov 30, 2009, at 4:05 PM, R.I.Pienaar wrote: > >> hello, >> >>>> require CLASS >>>> >>>> from any class starting in 25.1. >>>> >>>> This will ensure that every resource in the current class requires >>> every resource in the provided CLASS. >>> >>> I wasn't able to get 0.25 to work. After spending a few weeks in >>> abject frustration, unable to get the ssl keys to work, i was forced >>> to give up and go back to 0.24. >> >> modules are just convenient locations for files, templates and classes, >> there isnt a concept of 'do everything in this module' you need to create >> wrapper classes, for example: >> >> class php { >> include php::install >> include php::config >> } >> >> class php::xml { >> package{"php-xml": >> ensure => present, >> require => Class["php"] >> } >> } >> >> >> include php >> include php::xml >> >> The require function will make this easier as mentioned but on 0.24 this is >> your best bet >> >> -- >> R.I.Pienaar >> >> -- >> >> You received this message because you are subscribed to the Google Groups >> "Puppet Users" 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-users?hl=en. >> >> > > -- > > You received this message because you are subscribed to the Google Groups > "Puppet Users" 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-users?hl=en. > > > -- You received this message because you are subscribed to the Google Groups "Puppet Users" 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-users?hl=en.
