On Mon, Mar 14, 2011 at 5:31 PM, David Kavanagh <[email protected]> wrote:
> Here's what I ended up with (with real stuff in the classes...)
That definitely works too, and gives you a more flexible setup than my
suggestion.
> site.pp:
> stage { [ "pre", "post" ]: }
> Stage['pre'] -> Stage['main'] -> Stage['post']
> class first {
> ...
> }
> class second {
> ...
> }
> class third {
> ...
> }
> node default {
> class { 'first': stage => pre }
> class { 'second': stage => main }
> class { 'third': stage => post }
> }
>
> On Tue, Mar 15, 2011 at 12:13 AM, Nigel Kersten <[email protected]>
> wrote:
>>
>> On Mon, Mar 14, 2011 at 9:29 AM, David Kavanagh <[email protected]>
>> wrote:
>> > I understand how before, requires, etc work. I'm not quite so clear on
>> > stages.
>> > I have many modules I've created for various configuration items. My
>> > site.pp
>> > contains a class that simply includes them (some, based on facts). I
>> > have a
>> > default node that includes the class. That's fine. However, I want to
>> > ensure
>> > there is some order. I realize if I did this in the classes, I would be
>> > letting some modules know about other modules. To me, that breaks the
>> > encapsulation I've gained with the modules (to some extent).
>>
>> Have you seen the newer relationship syntax? You can define
>> relationships outside of the objects themselves, so you could do this
>> in site.pp
>>
>> Class["a"] -> Class["b"] -> Class["c"]
>>
>> etc
>
>
--
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.