Skip to content

Instantly share code, notes, and snippets.

@bitprophet
Created February 18, 2012 05:07
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
from fabric.api import env, run
from fabric.tasks import execute
solo_host = '192.168.5.250'
def firstSSH():
with settings(host_string=solo_host):
run("echo first")
executeHosts = []
for host in [some, other, variable, holding, your, real, host, list]:
executeHosts.append("notmmaley@" + host + ":8101")
execute(secondSSH, hosts=executeHosts)
with settings(host_string=solo_host):
run("echo first again")
def secondSSH():
run("echo second", shell=False, pty=False)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment