Here is an tutorial how to pass parameters to an capistrano 3 task.
namespace :task do
desc 'Execute the specific cmd task'
task :invoke, :command do |task, args|
on roles(:app) do
execute :cmd, args[:command]
end
end
end
Can executed with:
$ cap staging "task:invoke[arg]"
How can i use this in my deploy.rb? The following does not work.
before :started, "task:invoke[arg]"