Created
June 28, 2014 08:40
-
-
Save equinox79/11740d3ce92045ee08d7 to your computer and use it in GitHub Desktop.
fabric sample
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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