Are you wanting to discover the port from within a task associated
with that role? Note that the request, in that case, is kind of
ambiguous. Consider:
task :ping_database, :roles => db do
# what's the port number here?
end
At the point in question, there are three different servers active,
one which has port 3306 and one two with port 3307. (3, if you count
the first server, which is defined twice.)
What are you ultimately trying to do? There's probably a cleaner way
to accomplish it.
- Jamis
On 9/21/07, heimdull <[EMAIL PROTECTED]> wrote:
>
> Hi Guys,
>
> I'm trying to figure out a way to do this and here is what I'm
> thinking. I have some database servers that use different ports and I
> would like to set this in the role :
>
> role :db, "192.168.10.1", :primary => true, :port => "3306"
> role :db, "192.168.10.1", :port => "3307"
> role :db, "192.168.10.2", :no_release => true, :replica =>
> true, :port => "3307"
> role :db, "192.168.10.3", :no_release => true, :replica => true, :
> port => "3307"
>
> How can I later in a task pull the :port ?
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---