On Monday, January 27, 2014 1:05:16 AM UTC-6, Sam Rajagopal wrote: > > I have nodes.pp defined as follows > > node "abc.x.com", "123.x.com" { > include module1 > include module2 > include module3 > } > > Very simple definition. No parameterization, no scoping etc > When I run "puppet agent -t" on the agent, I see the execution jumping to > module 3 after module 1. > Not sure how I can do "before" or "after" to say - execute module 2 only > if module 1 is successful. > >
The order in which Puppet applies resources between which there are is no relationships is not predictable. As Jose says, you can express relationships between classes via the chaining arrows, just as if classes were resources. For example, Class['module1'] => Class['module2'] => Class['module3'] That gives you both ordering and dependency: if an earlier resource [/class] in such a chain fails, then the later ones will not be applied. And that's sensible, because if there is no dependency between two classes / resources then there should be no need for controlling their relative order of application. > Also, I get different results when I run the agent second time. Say, > something was owned by app user. Next time it becomes, root user. > appreciate any help. > There is no way we can guess what might be causing the different results without examining the relevant manifests. John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/26054a93-4083-4cd1-a614-badf45db1797%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.