#NEWLINE# def by_rolename( host , rolename , f , * args , **kwargs ) : #NEWLINE# #INDENT# if ( rolename is None ) : #NEWLINE# #INDENT# f ( * f , ** kwargs ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( rolename not in env . roledefs . keys ( ) ) : #NEWLINE# #INDENT# abort ( ( 'Invalid role name %s. Valid rolenames are %s' % ( rolename , env . roledefs . keys ( ) ) ) ) #NEWLINE# #UNINDENT# if ( host in env . roledefs [ rolename ] ) : #NEWLINE# #INDENT# return f ( * args , ** kwargs )