Getting the currently running host name in Capistrano
I don’t know if it is so obvious that no people talked about it, or that people actually don’t need to use it. I find that for any non-trivial tasks, it is necessary. There is a thread on Google Groups that talked about it but it didn’t spell out the answer directly. So here it is:
1 | current_host = capture("echo $CAPISTRANO:HOST$").strip |
Kind of anti-climatic lol.