Sorry Robin, not possible for a variety of boring internal reasons, you
should maybe consider adding metadata to your server definitions, where you
can loop the data you need (the :no_release => true is just arbitrary
metadata, for example)

- Lee

On 11 October 2010 11:46, Robin Bowes <[email protected]> wrote:

> Hi,
>
> I know that the run function can get access to the host name using the
> $CAPISTRANO:HOST$ variable, eg.
>
>  task :peer, :roles => :peer do
>     # stuff
>     run "some_command $(LC_ALL=C host $CAPISTRANO:HOST$ | awk '/has
> address /{print $4}' | head -n 1)"
>  end
>
> Is it possible to get access to the same thing within the task itself?
>
> eg. I'd like to do something like:
>
>  task :peer, :roles => :peer do
>     # stuff
>     require 'resolv'
>     host_ip = Resolv::DNS.new.getaddress("$CAPISTRANO:HOST$")
>     run "some_command #{host_ip}"
>  end
>
> Is that at all possible?
>
> Thanks,
>
> R.
> --
> "Feed that ego and you starve the soul" - Colonel J.D. Wilkes
> http://www.theshackshakers.com/
>
> --
> * 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]<capistrano%[email protected]>For
>  more options, visit this group at
> http://groups.google.com/group/capistrano?hl=en

-- 
* 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.com/group/capistrano?hl=en

Reply via email to