Skip to content

Instantly share code, notes, and snippets.

@miketheman
Created November 21, 2012 21:13
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 miketheman/4127763 to your computer and use it in GitHub Desktop.
Save miketheman/4127763 to your computer and use it in GitHub Desktop.
fabfile test
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 = ['root@ec2-50-xxxx.compute-1.amazonaws.com', 'root@ec2-54-xxxx.compute-1.amazonaws.com', 'root@ec2-107-xxxx.compute-1.amazonaws.com']
@notify
@task
@hosts(servers)
def hostname_test():
with cd('/srv'):
run('hostname')
$ 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