How can I refer to the current server in the Capistrano task? I want to curl local file to clear the APC cache, but the server is not listening on localhost , so I need the IP address of the server.
For instance,
role :web, "1.1.1.1", "2.2.2.2", "3.3.3.3" task :clear_apc, :role => :web do run "curl http://#{WHAT_DO_I_PUT_HERE}/deploy/clearAPC.php" end
Which variable will I use so that when performing the task in 1.1.1.1 it curl http://1.1.1.1/deploy/clearAPC.php , but when launched in 2.2.2.2 it calls curl http://2.2.2.2/deploy/clearAPC.php
source share