I wasn't aware of that layout of the syntax, that's a really interesting way
of writing it. The OP would seem to want "blocks" added to this though. This
is all very reminiscent of Stages though, so surely if there IS a solution
that satisfies the original need it would be an adjustment to stages. Maybe
more dynamic substages... main.a, main.b or something as actually different
stages would cause all sorts of mess if treated this glibly. If it were
possible to run multiple stages within a single class (you can't, right?)
then that'd nearly be the solution already.

Chris

On 5 July 2011 09:35, Ken Barber <[email protected]> wrote:

> Whats wrong with using chained resources?
>
> class x {
>  file { "a":
>  } ->
>  exec { "b":
>  } ->
>  exec { "c":
>  } ->
>  exec { "d":
>  }
> }
>
> ken.
>
> On Tue, Jul 5, 2011 at 4:40 AM, vagn scott <[email protected]> wrote:
> > Sometimes things just have to happen in sequence.
> > It is the simplest of relations, but puppet really
> > has no convenient, non-fiddly way to express it.
> > So, how about
> >
> >
> > class x {
> >
> >        order { "z":
> >
> >                file { "a":
> >                        ...
> >                }
> >
> >                exec {
> >                        "b": ... ;
> >                        "c": ... ;
> >                        "d": ... ;
> >                        "e": ... ;
> >                }
> >        }
> >
> > }
> >
> > Things inside order { } happen in the order
> > that they appear.  They implicitly have before
> > dependency assigned according to their position.
> >
> > --
> > 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.

Reply via email to