Skip to content

Instantly share code, notes, and snippets.

@johnboxall
Created October 28, 2009 00:23
Show Gist options
  • Save johnboxall/220106 to your computer and use it in GitHub Desktop.
Save johnboxall/220106 to your computer and use it in GitHub Desktop.
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