I have a namespace and several tasks in the namespace that start after deployment: updated. Here is an example:
namespace :myservice do task :start do on roles(:app) do sudo :start, "my/application" end end end
I would like one of these tasks to work only in a specific environment or as a host. How can i do this?
I would like to be able to filter in an environment, for example:
namespace :myservice do task :start do on roles(:app), env(:vagrant) do sudo :start, "my/application" end end end
What is the best way to do this?
capistrano capistrano3
Andy shinn
source share