Skip to content

Instantly share code, notes, and snippets.

@guixing
Created September 28, 2013 04:10
Show Gist options
  • Save guixing/6738284 to your computer and use it in GitHub Desktop.
Save guixing/6738284 to your computer and use it in GitHub Desktop.
from fabric.api import *
env.user = 'vagrant'
env.password = 'vagrant'
env.hosts = ['127.0.0.1',]
#env.roledefs = {
# 'web':['localhost'],
# 'db':['127.0.0.1'],
#}
def host_type():
run('uname -s')
def check_ver():
run("""LAST_VER=`curl -s http://127.0.0.1/deploy/lastver`;
LAST_WP=/var/www/releases/wordpress-${LAST_VER};
test -d ${LAST_WP};
""")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment