On Sun, Nov 25, 2012 at 8:56 AM, Mark <static.void....@gmail.com> 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? When I require Bar in the first example are > the A,B and C resources guaranteed to be executed before the resource in > Foo? Same question goes for example 2 > They don't work as expected. You need containment resources in class Bar. See documentation and ticket 8040 for more info and work around: http://docs.puppetlabs.com/puppet/2.7/reference/lang_containment.html http://projects.puppetlabs.com/issues/8040 HTH, Nan -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. 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.