Created
September 26, 2014 10:49
-
-
Save kontinuity/d6d948ad0dda16be0e30 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/python | |
from fabric.api import local, env, puts, run, require, cd, put, prefix | |
from fabric.decorators import parallel | |
def yummy(): | |
host_list = [ | |
(['localhost'], '/Users/username/private_key') | |
] | |
env.upg_command = 'sudo apt-get install bash' | |
setup_hosts(host_list) | |
def appy(): | |
host_list = [ | |
(['localhost'], '/Users/username/private_key') | |
] | |
env.upg_command = 'yum update bash' | |
setup_hosts(host_list) | |
def setup_hosts(host_list): | |
for hinfo in host_list: | |
hosts, key = hinfo | |
env.key_filename = key | |
env.hosts = hosts | |
@parallel | |
def upgrade_bash(): | |
run(env.upg_command) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment