Hi, I have following code in site.pp node default{ include abc include mno include xyz } when I trying to apply the modules are installed in parallel. I need to run the mno, only after completing the abc, and xyz only after completing mno. But I have noticed that the statements in the modules are executed irrespective to the order specified. Do we have any feature like "require" in Exec to include the modules. Thanks in advance, Sateesh B. -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
jcbollinger
2012-Feb-02 14:00 UTC
[Puppet Users] Re: How to specify the modules dependencies
On Feb 1, 12:23 am, sateesh <bbalasate...@gmail.com> wrote:> Hi, > > I have following code in site.pp > > node default{ > include abc > include mno > include xyz > > } > > when I trying to apply the modules are installed in parallel.No, they''re not. The Puppet agent is single-threaded, so it never does anything in parallel. On the other hand, the relative order of application is undefined for classes and resources that have no ordering relationship between them. This is intentional.> I need > to run the mno, only after completing the abc, and xyz only after > completing mno. But I have noticed that the statements in the modules > are executed irrespective to the order specified. Do we have any > feature like "require" in Exec to include the modules.The ''require'' metaparameter is available for all resources, as are its friends ''before'', ''notify'', and ''subscribe''. Furthremore, if Class[''mno''] always depends on Class[''abc''] being applied first, on every node, then you can put "require ''abc'''''' at the top of its body (this is different from the ''require'' metaparameter). In that case, you would no longer need your node definition to ''include'' abc, as ''include''ing mno would bring in abc automatically. The same applies to class xyz: it can ''require'' one or both of abc and mno (regardless of what class mno does in this regard). Alternatively, you can specify order of application in your node definition by using the arrow operators. For example: Class[''abc''] -> Class[''mno''] -> Class[''xyz''] John -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.