All pastes #2123867 Raw Edit

Anonymous

public text v1 · immutable
#2123867 ·published 2012-03-03 18:18 UTC
rendered paste body
phil@tinderbox:~/src/fabfile $ cat fabfile.py
from __future__ import with_statement
from fabric.api import *
from fabric.decorators import *
from fabric.contrib.console import confirm

env.user = "root"
env.roledefs =  {
	'hardware': ['kopimist' ],
	'vm': ['root@mogwai', 'apollo', 'kacher', 'asylum', 'tinderbox'],
	'bastion': ['phil@sandbag', 'phil@thane'],
}
# {'user1@host1:port1': 'password1', 'user2@host2.port2': 'password2'}
env.passwords = { }

def deploy():
	code_dir = '~/.dotfiles'
	with cd(code_dir):
		run("git pull origin master")

def home_dir_status():
	code_dir = '~/.dotfiles'
	with cd(code_dir):
		run("git status")

def ubuntu_install_version_upgrader():
	""" installs the ubuntu tool that updates you to the next distro """
	run("sudo apt-get install -y update-manager-core")

def ubuntu_upgrade_os():
	""" runs the ubuntu OS upgrade tool """
	run("sudo do-release-upgrade")