Reputation: 2349
I'm currently using the multistage extension, but within each stage I have a role that requires a different :user, and :deploy_to path.
Example deploy/production.rb:
role :web, 'myhost1'
role :queue, 'myhost2'
Both servers need a checked out release, but the :web role uses /var/www/html
where :queue uses /home/username/path/to/releases
, and both use different SSH user.
I also have a staging and qa stage configured similarly (both have :web and :queue roles on different servers).
How can I set these roles-specific options?
Upvotes: 4
Views: 944
Reputation: 8894
you simply specify role-specific options as a hash argument to role:
role :web, 'myhost1', {
:user => 'bill',
:deploy_to => '/var/www/html'
}
for more flexibility, try https://github.com/capistrano/capistrano/wiki/2.x-Multistage-Extension
Upvotes: 2