Created
October 28, 2009 00:23
-
-
Save johnboxall/220106 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 roles(role): | |
def do_roles(func): | |
def wrapper(*args, **kwargs): | |
if env.host in env.roledefs[role]: | |
return func(*args, **kwargs) | |
return wrapper | |
return do_roles |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment