Task-specific SSH options

17 views
Skip to first unread message

Jimmy Cuadra

unread,
Jan 22, 2014, 8:27:13 AM1/22/14
to capis...@googlegroups.com
Greetings,

I'm using Capistrano 3 to deploy a Rails application on Ruby 2.0. I'd also like to use Capistrano to install Puppet on the production server, upload some Puppet files, and run `puppet apply` on the server. I've written some custom tasks to do this. However, I haven't been able to figure out a way to use different SSH settings for the same production server depending on which tasks I'm running. The workflow is like this:

$ cap production puppet
$ cap production deploy

The first command is my custom one, and I want it to connect over SSH as the root user. I want the second command to connect over SSH as another user that is created as a result of the first command. I'd like the created user to be the default for this Capistrano stage. How can I specify in my "puppet" task that alternate SSH options should be used? Thanks!
Reply all
Reply to author
Forward
0 new messages