Hi, I am using Capistrano to do a deploy to servers with different roles. I want call after_deploy in the following manner. task :after_deploy, :roles => [:rolea] do run "task a" end task :after_deploy, :roles => [:roleb] do run "task b" end The problem seems that the second after_deploy clobbers the first even though they are meant for different roles. I do a workaround now by making role a use after_symlink, but now I am adding a few more roles and I am running out of after_* to workaround. Is there a way to do the following task :after_deploy do if current_server.role == :rolea run "task a" elsif current_server.role == :roleb run "task b" end end Thanks in advance for the help. -Curtis --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---