On Feb 17, 4:41 pm, jimbob palmer <jimbobpal...@gmail.com> wrote: > On Feb 17, 4:19 pm, "R.I.Pienaar" <r...@devco.net> wrote: > > > > > > > > > > > ----- Original Message ----- > > > From: "jimbob palmer" <jimbobpal...@gmail.com> > > > To: puppet-users@googlegroups.com > > > Sent: Friday, February 17, 2012 3:12:46 PM > > > Subject: [Puppet Users] Puppet unless behaviour with a dependency > > > > Is this really expected behaviour? Should the second Exec succeed > > > even if the first never runs? > > > > exec { "one": > > > command => "/bin/true", > > > unless => '/bin/false' > > > } > > > exec { "two": > > > command => "/bin/true", > > > require => Exec["one"], > > > } > > > I think this ishttps://projects.puppetlabs.com/issues/5876 > > > i think this is a major failure of Puppet to honour what people expect > > and what the language suggests in the choice of meta param names etc > > but there's some debate in that ticket > > It's causing me a real headache. > > I need to run an expensive command if a string is not present in a > file. If the string is present, I abort. That expensive command > finishes by writing the string to the file. > > If the expensive command runs I need to run a second command, which is > also expensive to run. > > How can I do this? If I duplicate the unless the second command can > never run since the string will be present in the file.
This also doesn't work :( command => "/bin/true; /bin/second_command" -- 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.