Module: CapistranoSSH::Recipes

Defined in:
lib/capistrano_ssh/recipes.rb

Class Method Summary collapse

Class Method Details

.load_into(configuration) ⇒ Object



5
6
7
8
9
10
11
12
13
# File 'lib/capistrano_ssh/recipes.rb', line 5

def self.load_into(configuration)
  configuration.load do
    desc "Open a ssh connection to one of the remote servers"
    task :ssh, :roles => :app do
      hostname = find_servers_for_task(current_task).first
      run_locally "ssh -l #{user} #{hostname} -p #{port} -t 'cd #{current_path} && bash'"
    end
  end
end