Can Capistrano set variables based on a role?

Posted by conickal on Stack Overflow See other posts from Stack Overflow or by conickal
Published on 2011-01-01T02:38:58Z Indexed on 2011/01/01 2:54 UTC
Read the original article Hit count: 167

Filed under:
|
|

I am trying to use Capistrano to deploy to two different roles, using Bundler on both, however the Bundler command and flags will be different. Is it possible to set variables that are specific to a role? Either something like:

set :bundle_flags, "--deployment --quiet", :role => "web"

or:

role :web do
  set :bundler_cmd, "--deployment --quiet"
end

Neither of those two options work, of course. Is there a way to accomplish this, or something like it?

© Stack Overflow or respective owner

Related posts about ruby

Related posts about capistrano