Also, to execute a task only on (for instance) the hosts that have
":primary => true" defined:

  task :foo, :roles => :web, :only => { :primary => true } do
    # ...
  end

That'll run on all hosts in the web role that have :primary => true set.

- Jamis

On Mon, Jun 1, 2009 at 11:59 AM, Lee Hambley <[email protected]> wrote:
> there is the :once => true addition you can make to the run call definition
> to make it only run on the first host that matches.
> Documented here: http://wiki.capify.org/index.php/Run#options
> 2009/6/1 Supagroova <[email protected]>
>>
>> Hi all,
>>
>> I have a recipe deploying to multiple hosts, and have a 'after'
>> callback setting a tag for the deploy in my SCM. Problem is it's being
>> executed each time for each host and I only want to execute it once:
>>
>> role :web, '_IP_ADDRESS_', '_IP_ADDRESS_', '_IP_ADDRESS_', :primary =>
>> true
>>
>> +
>>
>> after "deploy:update_code", "deploy:create_scm_tag"
>>
>> Any ideas/help?
>>
>> Thanks!
>>
>>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Capistrano" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.co.uk/group/capistrano?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to