Created
September 30, 2011 23:30
-
-
Save glassresistor/1255325 to your computer and use it in GitHub Desktop.
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
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