Greetings,
I would like to implement a run method within a task that is slightly
different for its different servers. It is my impression that in
Cap1.4 that this is not really possible?? In essence, the command
string is fixed in the Actor (for all servers) and passed to the
remote server as a "constant". E.g. run "echo #{deploy_to}" is sent to
every remote server fully expanded as "echo /usr/local/foo", and there
is no way to apply any server-by-server variation to the expansion. Is
this correct??
But in Cap2, it sounds like we can use $CAPISTRANO:HOST$ in the
command expansion. So assuming that I have set a variable in my
CapFile as, say, :host_to_port_map. Then could I use it in my run
command as, say, run "echo \"port = #{host_to_port_map[$CAPISTRANO:HOST
$]}\"" ?? This way I could apply at least some variation. It is still
fully expanded before it is passed to the servers, but allows for some
server-by-server variation.
Thanks,
-- Chris
BTW: I know that I can just try this in Cap2, and figure it out. But
am hoping to get some idea of whether I have a hope of succeeding
before I convert my Cap1.4 project to Cap2. TIA
--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---