You can do:

  task :after_update_for_server1, :roles => :server1 do
     # ...
  end

  task :after_update_for_server2, :roles => server2 do
    # ...
  end

  task :after_update do
    after_update_for_server1
    after_update_for_server2
  end

(Note, though, that in cap2, the after_* method of extending tasks is
deprecated. You'd use the "after" keyword instead.)

- Jamis

On 8/7/07, jemminger <[EMAIL PROTECTED]> wrote:
>
> hello,
>
> i want to have different after_update tasks run for different roles,
> e.g.
>
> role :server1, 'foo.com'
> role :server2, 'bar.com'
>
> task :after_update, :roles => :server1 do
>   stuff for server1
> end
>
> task :after_update, :roles => :server2 do
>   different stuff for server2
> end
>
> how can i do this?
> thanks,
> jeff
>
>
> >
>

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