Created
November 19, 2012 23:21
-
-
Save ampledata/4114757 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
import fabric.api | |
import fabric.state | |
@fabric.api.parallel | |
def _sudo(cmd): | |
"""Wraps ``fabric.operations.sudo`` with custom stuff.""" | |
fabric.operations.sudo("sudo gba %s" % cmd) | |
def uptime(): | |
"""Gets uptime on hosts.""" | |
fabric.state.env.hosts = ['web1', 'web2'] | |
_sudo('uptime') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment