Hello,

I must be overlooking something because I do not understand cap's
behaviour. The problem seems simple:

why is the task stop_default_apache called for storage roles?

To present my problem here, I simplified my context to the following:

role :app, "10.0.0.14"
role :app, "10.0.0.15"
role :static, "10.0.0.14"
role :storage, "10.0.0.45"               # st015
role :storage, "10.0.0.46"               # st016


task :after_setup do
  after_setup_common
  after_setup_app
  after_setup_storage
  after_setup_static
end

task :after_setup_storage, :roles => :storage do
end

task :after_setup_app, :roles => :app do
  stop_default_apache
end

task :after_setup_static, :roles => :static do
  stop_default_apache
end

task :stop_default_apache do
  run 'echo "Stopping apache on $HOSTNAME"'
  sudo "httpd -k stop"
end


Here is the relevant part of the output:


  * executing task after_setup
  * executing task after_setup_common
  * executing task install_ssh_key
  * executing task after_setup_app
  * executing task stop_default_apache
  * executing "echo \"Stopping apache on $HOSTNAME\""
    servers: ["10.0.0.14", "10.0.0.15", "10.0.0.45", "10.0.0.46"]
    [10.0.0.14] executing command
    [10.0.0.45] executing command
    [10.0.0.46] executing command
 ** [out :: 10.0.0.14] Stopping apache on wb004
 ** [out :: 10.0.0.45] Stopping apache on st015
    [10.0.0.15] executing command
 ** [out :: 10.0.0.46] Stopping apache on st016
 ** [out :: 10.0.0.15] Stopping apache on wb005
    command finished


I am puzzled, could anyone explain this ?


-- Arnaud.

P.S.

$ cap -V
/usr/bin/cap:17:Warning: require_gem is obsolete.  Use gem instead.
Capistrano v1.4.1


--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---

Reply via email to