On Sunday, November 25, 2012 10:56:40 AM UTC-6, Smashed wrote: > > Trying to figure out if these would behave the same or not? > > Example 1: > ----------------- > > class Foo { > require Bar > someresource { 'baz': > …. # This depends on A,B and C being already completed > } > } > > class Bar { > include A > include B > include C > } > > > Example 2: > ---------------- > > class Foo { > include Bar > someresource { 'baz': > …. > require => Class['Bar'] > } > } > > class Bar { > include A > include B > include C > } > > > So will these behave the same?
Yes. > When I require Bar in the first example are the A,B and C resources > guaranteed to be executed before the resource in Foo? A, B, and C are classes, not resources. The resources they contain are not guaranteed to be applied before Someresource['baz'], but if there were any resources declared directly by class Bar then they would all be applied before Someresource['baz']. Do not use run stages for this. They are way overkill for the problem. If you needed to add new stages every time you had to enforce resource ordering then you would quickly end up with an unmanageable mess. See my response to your other thread on this question (https://groups.google.com/forum/?fromgroups=#!topic/puppet-users/buREmDC8Py4) for more information. In the future, it will suffice to ask your question once. John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/W1T-29xHsy0J. To post to this group, send email to puppet-users@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.