If I understood, only with add machineB to role :app should works: role :app, "machineA", "machineB" role :web, "machineA" role :db, "machineA", :primary => true
namespace :deploy do desc "Restarting nginx with god" task :restart, :roles => :app, :except => { :no_release => true } do sudo "/etc/init.d/god restart" end end vanderkerkoff wrote: > Hello everyone > > I've been using Cpistrano bery basically for a while now and I need > some advice. I'm using Jamis multistage gem > > http://weblog.jamisbuck.org/2007/7/23/capistrano-multistage > > This is working great for me deploying to staging and then production > machines. > > I now have a clone of an assets server setup. When I deploy to one of > them, I want to deploy to the other one at the same time. I also want > to restart passenger on both machines as well. > > Is the best method for doing this to edit an existing role in the > deploy script with the other servers FQDN in and then running cap > deploy as normal? I'd also have to add the new role to the > description of the restart task I guess. > > Here's what I'm thinking, if someone could please let me know if I'm > going down the right track I'd be more than grateful. > > This code > > role :app, "machineA" > role :web, "machineA" > role :db, "machineA", :primary => true > > namespace :deploy do > desc "Restarting nginx with god" > task :restart, :roles => :app, :except => { :no_release => true } do > sudo "/etc/init.d/god restart" > end > end > > Becomes > > role :app, "machineA" > role :web, "machineB" > role :db, "machineA", :primary => true > > namespace :deploy do > desc "Restarting nginx with god" > task :restart, :roles => :app, :web :except => { :no_release => > true } do > sudo "/etc/init.d/god restart" > end > end > > Any help or guidance will be greatly appreciated. > > > > -- Rafa --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Capistrano" group. To post to this group, send email to capistrano@googlegroups.com To unsubscribe from this group, send email to capistrano+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.co.uk/group/capistrano?hl=en -~----------~----~----~----~------~----~------~--~---