ky wrote:
 >
 > I could keep hacking, but I figured it'd be wiser to get a Community
 > Approved Solution (tm).
 >
Yup, that's the option :) Actually maybe the simplest solution for you 
will be to place the code that will discover the hostname into the 
/etc/capistrano.conf, because it is executed prior to any recipe:
..
.. #discover dynamic host name, put it into 'dhname' variable
..
set :dynamic_host, dhname

and then in one of your recipies you can have the following task definition:
task :check_app_status, :roles => dynamic_host do
..
end

In this case the task's role will be the 'dynamic_host' contents.

> 
> The second solution throws this error: /usr/local/lib/ruby/gems/1.8/
> gems/capistrano-2.0.0/lib/capistrano/configuration/connections.rb:
> 121:in `execute_on_servers': undefined method `host' for
> "ec2-67-202-12-42.z-1.compute-1.amazonaws.com":String (NoMethodError).

Sorry, the right variant is the:
arent.roles[:myrole] = [] #clearing the role servers list
parent.role :myrole, Capistrano::ServerDefinition.new(server_host)

-- 
Cheers,
Michael


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