Code for Concinnity

beautiful and elegant solutions


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.

Published by kizzx2, on November 29th, 2009 at 3:31 pm. Filled under: Useful tips Tags: , No Comments

No comments yet.

Leave a Reply

Spam protection by WP Captcha-Free