Last active
December 25, 2015 01:49
-
-
Save mumumu/6898184 to your computer and use it in GitHub Desktop.
This file contains hidden or 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/env python | |
from fabric.api import local, sudo, hosts, env | |
env.warn_only = True | |
env.skip_bad_hosts = True | |
def localup(): | |
local('sudo apt-get update && sudo apt-get upgrade') | |
# | |
# 192.168.100.11 is a nonexistent host. | |
# | |
@hosts('192.168.100.11', 'vmhost', 'monitor') | |
def upgrade(): | |
sudo('aaaaaaaaaaaaa') # unknown command | |
sudo('apt-get update') | |
sudo('apt-get upgrade') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment