On 13.12.2009 23:12, Douglas Garstang wrote: > Ohad, > > No, not really because for starters there are anywhere from 1 to 10 > instances of jboss running, but not always 10. It depends on the node. > If it was always 10, I could say something like > before=>Service["jboss-inst0"], before=>Service["jboss-inst1"] etc. > > PLUS the jboss service is controlled inside a definition, not a class. > I don't know if I can use before => in that case.
What you want to do is introduce a well-known, if artificial, "synchronization" resource. In the simplest case this can be a stupid stamp file: | package { jboss: ... } | | application { | app1: .. | require => Package[jboss], | before => File[/tmp/stamp]; | app2: .. | require => Package[jboss], | before => File[/tmp/stamp]; | app3: .. | require => Package[jboss], | before => File[/tmp/stamp]; | } | | file { | "/tmp/stamp": | } | | service { | jboss1: | require => File[/tmp/stamp]; | jboss2: | require => File[/tmp/stamp]; | jboss3: | require => File[/tmp/stamp]; | } You can put the stamp file in a class that you include everywhere you need to reference it. That way you can avoid all corner cases (like zero applications). The other resources can be placed into classes or defines without prejudice. The only thing I'm not sure about, is whether notifications (notify/subscribe) would propagate through the stamp file. If you need this, I'd start experimenting with using an Exec with refreshonly instead. Regards, DavidS -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@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.