You could possibly set a task for each role type and have it set a
variable that you could use in another task. I am just shooting from
the hip here.

In the past I have just created a separate task for each roll and
called then manually run them as really I only have to do infrequently
anyway. Here is a paste of what I am talking about. In this recipe I
made a task that runs both config tasks. Anyway this should help get
you going. Just remember what Jamis said about multiple servers per
role.

http://pastie.org/394152

- Ian


On Thu, Feb 19, 2009 at 12:21 AM, Jamis Buck <[email protected]> wrote:
>
> There's really no such thing as a "current role", since servers can
> exist in multiple roles simultaneously, and tasks can be executed on
> multiple roles simultaneously. In other words, in general, Capistrano
> can't know which role you mean for any particular server. The case where
> you're dealing with only a single server, for instance, where the server
> is app, db, and web all in one, is the simplest example of what I mean.
>
> - Jamis
>
> On 2/18/09 6:12 PM, Celso Pinto wrote:
>> hi all,
>>
>> to deploy our service I need to generate configuration files for each
>> role in capistrano (web.config, api.config, etc. where web/api is the
>> role name but content is mostly the same). How can I retrieve the
>> current role name to name the configuration file accordingly? I tried
>> to look up a variable but couldn't find one, is this something
>> possible to do?
>>
>> regards
>>
>> >
>
>
> >
>



-- 
----------------------
Ian Sheridan
http://iansheridan.dyndns.org
----------------------

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