Created
July 19, 2016 21:59
-
-
Save n8foo/7574ac80f9ba37351ae7f1c1152ea65b to your computer and use it in GitHub Desktop.
example python fabric task
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
#! /bin/env/python | |
from fabric.api import * | |
env.use_ssh_config=True | |
env.roledefs = { | |
'all': [ | |
'host1', | |
'host2', | |
'host3', | |
'host4', | |
'host5'], | |
} | |
#@parallel(pool_size=3) | |
@task | |
def aptget_upgrade(): | |
sudo('apt-get -y update') | |
sudo('apt-get -y upgrade') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment