Created
November 21, 2012 21:13
-
-
Save miketheman/4127763 to your computer and use it in GitHub Desktop.
fabfile test
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
from fabric.api import task, run, hosts, sudo, cd, execute | |
from dogapi.fab import setup | |
from dogapi.fab import notify | |
setup(api_key = '<redacted>') | |
servers = ['[email protected]', '[email protected]', '[email protected]'] | |
@notify | |
@task | |
@hosts(servers) | |
def hostname_test(): | |
with cd('/srv'): | |
run('hostname') |
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
$ fab hostname_test | |
No hosts found. Please specify (single) host string for connection: ^C | |
Stopped. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment