No, that will work correctly. Roles are not inherited by "subtasks".  
If a task B is called from task A, then task B will be restricted to  
the servers as described in B's task definition, and will not be  
affected by A's server scope.

- Jamis

On Jun 20, 2008, at 9:32 AM, Scott Diedrick wrote:

>
> So the issue I am dealing with is that I want to be able to call
> something like:
> cap deploy:stop
> or
> cap deploy:start
>
> And have it both stop/start my mongrel clusters, as well as start/stop
> my backgroundRB.
>
> So I want something like:
> ------------------------------------------
> task :mongrel_start, :roles => :app do
>  run "cd #{current_path} && mongrel_rails cluster::start -C
> #{mongrel_conf}"
> end
>
> task :mongrel_stop, :roles => :app do
>  run "cd #{current_path} && mongrel_rails cluster::stop -C
> #{mongrel_conf}"
> end
>
> task :background_start, :roles => :db do
>  run "command to start background"
> end
>
> task :background_stop, :roles => :db do
>  run "command to stop background"
> end
>
> task :start do
>  mongrel_start
>  background_start
> end
>
> task :stop do
>  mongrel_stop
>  background_stop
> end
> ------------------------------------------
>
> But from what I understand it will run all the tasks on app and db
> servers.  So how would you do this?
>
> >


--~--~---------~--~----~------------~-------~--~----~
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