Google Mail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Message from discussion Identify current host

View Parsed - Show only message text

Received: by 10.210.78.16 with SMTP id a16mr993426ebb.7.1246876261043;
        Mon, 06 Jul 2009 03:31:01 -0700 (PDT)
Return-Path: <r...@aspgems.com>
Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.24])
        by gmr-mx.google.com with ESMTP id 15si1463701ewy.0.2009.07.06.03.31.00;
        Mon, 06 Jul 2009 03:31:00 -0700 (PDT)
Received-SPF: pass (google.com: domain of r...@aspgems.com designates 74.125.78.24 as permitted sender) client-ip=74.125.78.24;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of r...@aspgems.com designates 74.125.78.24 as permitted sender) smtp.mail=...@aspgems.com
Received: by ey-out-2122.google.com with SMTP id 9so888321eyd.41
        for <capistrano@googlegroups.com>; Mon, 06 Jul 2009 03:31:00 -0700 (PDT)
Received: by 10.210.125.7 with SMTP id x7mr3266774ebc.15.1246876260646;
        Mon, 06 Jul 2009 03:31:00 -0700 (PDT)
Return-Path: <r...@aspgems.com>
Received: from ?192.168.1.34? (219.Red-83-54-180.dynamicIP.rima-tde.net [83.54.180.219])
        by mx.google.com with ESMTPS id 28sm11284662eye.26.2009.07.06.03.30.59
        (version=SSLv3 cipher=RC4-MD5);
        Mon, 06 Jul 2009 03:30:59 -0700 (PDT)
Message-ID: <4A51D275.9000108@aspgems.com>
Date: Mon, 06 Jul 2009 12:31:17 +0200
From: "Rafael G." <r...@aspgems.com>
User-Agent: Thunderbird 2.0.0.22 (X11/20090605)
MIME-Version: 1.0
To: capistrano@googlegroups.com
Subject: Re: [capistrano] Identify current host
References: <be2921990907031747g35a66441w15eecfc687165b3b@mail.gmail.com>
In-Reply-To: <be2921990907031747g35a66441w15eecfc687165b3b@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Gary Richardson wrote:
> Hey,
>
> Two part question that I haven't been able to answer:
>
> 1) can I get the current host a task is executing on? I've read some 
> stuff about $CAPISTRANO:HOST$, but it doesn't seem to work for me
I tested this task and works for me:

    task :host_name do
        run "host $CAPISTRANO:HOST$"
    end

What OS are you using? Could you paste your deploy.rb in 
someplace(gist.github, pastie,...)?

> 2) if I have an array of values (let's say an array that maps ec2 host 
> names to ec2 instance id's), can I use this same method to look up 
> something from that array?
Capistrano uses ruby If you can do it with ruby you can do the same in a 
capistrano task.

-- 
Rafa


Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google