| |
Capistrano |
Hey, 1) can I get the current host a task is executing on? I've read some stuff For example: task :example do PS, the error I get when I run a task with $CAPISTRANO:HOST$ is: * executing "echo $CAPISTRANO:HOST$" Thanks!
Two part question that I haven't been able to answer:
about $CAPISTRANO:HOST$, but it doesn't seem to work for me
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?
instanceId = lookUpTable[hostname]
run "somecommand -h #{hostname} -i #{instanceid}"
done
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.5/lib/capistrano/server_definiti on.rb:16:in
`initialize': undefined method `match' for 101:Fixnum (NoMethodError)
from
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.5/lib/capistrano/role.rb:80:in
`new'
from
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.5/lib/capistrano/role.rb:80:in
`wrap_server'
from
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.5/lib/capistrano/role.rb:98:in
`wrap_list'
from
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.5/lib/capistrano/role.rb:97:in
`map'
from
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.5/lib/capistrano/role.rb:97:in
`wrap_list'
from
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.5/lib/capistrano/role.rb:59:in
`to_ary'
from
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.5/lib/capistrano/role.rb:74:in
`concat'
from
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.5/lib/capistrano/role.rb:74:in
`dynamic_servers'
... 28 levels...
from
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.5/lib/capistrano/cli/execute.rb: 14:in
`execute'
from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.5/bin/cap:4
from /usr/bin/cap:16:in `load'
from /usr/bin/cap:16