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. > > -- > Bruce > > What would Edward Woodward do? > > -- > 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<puppet-users%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > > 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. My guess is that using both, stages and generic concepts according to the requirement makes sense. -- 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.