Can I execute task for capistrano 3 before connect on ssh?

118 views Asked by At

I need to execute special task before connect to server by ssh, example:

task :init do
    # get data from http request
    set :my_data, "http response"
end

Can I set "before callback" for it in capistrano 3?

1

There are 1 answers

0
Kroid On

I think this is impossible. Instead I created rake task - it send request, read response and call command:

bundle exec cap deploy production my_variable=my_responce