On Fri, 15 Oct 2010 17:54:17 +0530
Mohit Chawla wrote:

> On Fri, Oct 15, 2010 at 4:46 PM, Bruce Richardson
> <itsbr...@workshy.org>wrote:
> 
> > On Fri, Oct 15, 2010 at 12:19:36PM +0200, Arnau Bria wrote:
> > > 1.-) Stage vs require Class. May we say that stages are groups of
> > > class requires? So a simple/basic example:
> > >
> > > class A {
> > > require class B
> > > }
> > >
> > > class B{
> > > require class C
> > > }
> > >
> > > Is like defining :
> > >
> > > Stage[pre] -> Stage[main] -> Stage[post]
> > >
> > > class { A: stage => pre }
> > > class { B: stage => main }
> > > class { C: stage => post }
> >
> > Is it the same?  I haven't investigated stages, but I don't think it
> > would be.  In your first example, Class B will not be evaluated if
> > any resource in class A fails.  Is this true in the second
> > example?  I actually hope not; if it is true, stages have to be
> > used very carefully indeed.

that's a good point. 

> Also, apart from what Bruce mentioned, as a simple example, if you
> want to update your repositories, say through apt-get update, then
> using stages  is more easier than figuring out the appropriate class
> require or include statements (you can find a solution like this
> though in the mailing lists, probably better than using stages, I
> haven't investigated). So, you can have a module be executed before
> the main stage, which just does apt-get update. Doing something
> similar through require <class> statements would be cumbersome IMO.

I completely agree on that point, and for that reason I'm asking about
stages, for fully understanding them and use them appropriately. Stages
can make our life really simple.


 
> My guess is that using both, stages and generic concepts according to
> the requirement makes sense.

If you look at my OP and my stages, you'll see that I first configure
repos -> os -> main -> gLite(sutom software)  -> post. But I also have
some class require in "os" stage, i.e.
 

Thanks for your replies,
Arnau

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@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.

Reply via email to