Hi all, Here is my deploy.rb: ------------------ set :application, "myapp" set :user, "www"
role :bg1, "bg1.lan" role :bg2, "bg2.lan" default_run_options[:pty] = true task :foo do run "echo 1", :roles => :bg1 run "echo 2", :roles => [ :bg1, :bg2 ] end ------------------ $ cap foo ** [out :: bg1.lan] 1 ** [out :: bg1.lan] 2 ** [out :: bg2.lan] 2 For example, I want to run "foo" task but evaluate code that addresses desired role? $ cap foo ROLES=bg2 ** [out :: bg2.lan] 1 ** [out :: bg2.lan] 2 But I didn't expected that it will run "echo 1" on bg2, cause it's not addressed to it. I've expected only: ** [out :: bg2.lan] 2 ------------------ I have 10 servers to deploy to, but almost every time, I need to deploy only selected ones, using the same tasks I use for deploy. For example, to run "cap deploy ROLES=bg2" and do all the chain of tasks, filtering by those, which is addressed for bg2. Are there any solution? Thank you in advance. -- * You received this message because you are subscribed to the Google Groups "Capistrano" group. * To post to this group, send email to [email protected] * To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/capistrano?hl=en
