Skip to content

Instantly share code, notes, and snippets.

@glassresistor
Created September 30, 2011 23:30
Show Gist options
  • Save glassresistor/1255325 to your computer and use it in GitHub Desktop.
Save glassresistor/1255325 to your computer and use it in GitHub Desktop.
def seq_roles(role):
def attach_roles(func):
@wraps(func)
def inner_decorator(*args, **kwargs):
for host in env.roledefs[role]:
with settings(host_string = host):
func(*args, **kwargs)
return inner_decorator
return attach_roles
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment