Skip to content

Instantly share code, notes, and snippets.

@equinox79
Created June 28, 2014 08:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save equinox79/11740d3ce92045ee08d7 to your computer and use it in GitHub Desktop.
Save equinox79/11740d3ce92045ee08d7 to your computer and use it in GitHub Desktop.
fabric sample
from fabric.api import *
env.user = 'vagrant'
env.password = 'vagrant'
# enable .ssh/config
#env.use_ssh_config = True
def develop():
env.hosts = ['localhost', '127.0.0.1' ]
def production():
env.hosts = ['localhost']
def hello_fab():
run("uname -a")
sudo("whoami")
with cd('/usr/local/src'):
sudo('pwd')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment