Closed jbarbuto closed 10 years ago
You can duplicate with this test manifest
class foobarbaz {
notify { 'foobarbaz': }
}
class bazbarfoo {
notify { 'bazbarfoo': }
}
class wrapper {
class { 'foobarbaz': } ->
class { 'supervisord': } ->
class { 'bazbarfoo': }
}
include wrapper
Without containment
Notice: /Stage[main]/Supervisord::Install/Package[supervisor]/ensure: created
...
Notice: /Stage[main]/Supervisord::Service/Service[supervisord]/ensure: ensure changed 'stopped' to 'running'
Notice: foobarbaz
Notice: /Stage[main]/Foobarbaz/Notify[foobarbaz]/message: defined 'message' as 'foobarbaz'
Notice: bazbarfoo
Notice: /Stage[main]/Bazbarfoo/Notify[bazbarfoo]/message: defined 'message' as 'bazbarfoo'
With containment
Notice: foobarbaz
Notice: /Stage[main]/Foobarbaz/Notify[foobarbaz]/message: defined 'message' as 'foobarbaz'
Notice: /Stage[main]/Supervisord::Install/Package[supervisor]/ensure: created
...
Notice: /Stage[main]/Supervisord::Service/Service[supervisord]/ensure: ensure changed 'stopped' to 'running'
Notice: bazbarfoo
Notice: /Stage[main]/Bazbarfoo/Notify[bazbarfoo]/message: defined 'message' as 'bazbarfoo'
Thanks @jbarbuto really useful addition.
Without this, a wrapper class can't enforce ordering on the module.
http://puppetlabs.com/blog/class-containment-puppet