Skip to content

Instantly share code, notes, and snippets.

@n8foo
Created July 19, 2016 21:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save n8foo/7574ac80f9ba37351ae7f1c1152ea65b to your computer and use it in GitHub Desktop.
Save n8foo/7574ac80f9ba37351ae7f1c1152ea65b to your computer and use it in GitHub Desktop.
example python fabric task
#! /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