It's a weird edge case with what I'm doing, as it's an extension of capistrano, it downloads puppet manifests to the remote server then runs them.
I'll add a before step as recomended by dbray! Thanks On Friday, 1 March 2013 03:46:14 UTC, dbray wrote: > > That actually only works if you have one server. If you have more than one > you risk raising a positive when a different box doesn't have what you are > which'ing. > > 'which' will set an exit code > 0 if the executable is not found. Cap will > abort on a failed command so all you need is > > run "which puppet" > > Better: > > Test and see if it can respond with a more significant request. > > run "puppet agent --fingerprint" > > Block deploys: > > before :deploy do > run "puppet agent --fingerprint" > end > > YMMV as I don't use puppet. > > > On Feb 28, 2013, at 7:28 AM, Peter M Souter <[email protected]<javascript:>> > wrote: > > Hi guys, > > Quick question: What would be the best way of making sure a service is > installed on the remote server, and then aborting if it's not? > > Right now I have something like this: http://pastie.org/6354736 > > it seems a bit messy, but that's how I've seen it done in other capistrano > recipes that run a command that has an exit code. > > Thanks! > > -- > -- > * You received this message because you are subscribed to the Google > Groups "Capistrano" group. > * To post to this group, send email to [email protected]<javascript:> > * To unsubscribe from this group, send email to > [email protected] <javascript:> For more options, visit > this group at http://groups.google.com/group/capistrano?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Capistrano" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] <javascript:>. > For more options, visit https://groups.google.com/groups/opt_out. > > > > -- -- * You received this message because you are subscribed to the Google Groups "Capistrano" group. * To post to this group, send email to [email protected] * To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/capistrano?hl=en --- You received this message because you are subscribed to the Google Groups "Capistrano" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
