I want to use Fabric to deploy my web app code to development, staging and production servers. My fabfile:
def deploy_2_dev(): deploy(\'dev\') def deploy_
It's very simple. Just initialize the env.host_string variable and all of the following commands will be executed on this host.
from fabric.api import env, run env.host_string = 'user@exmaple.com' def foo: run("hostname -f")