I have this task in may deploy.rb file:
desc 'open ssh session in background'
task :ssh_in_background do
run_locally do
execute "ssh -o 'ExitOnForwardFailure yes' -NMS ~/.ssh-tunnel -f #{fetch(:rails_env)}-#{fetch(:application)}"
execute "exit"
end
end
When I run this task, all it does is hang. It never quits despite the -f
parameter.
How do I make this task exit so that capistrano will continue on?