def nodes_with_role(rolename):
    """Configures a list of nodes that have the given role in their run list"""
    nodes = [n['name'] for n in
             lib.get_nodes_with_role(rolename, env.chef_environment)]
    if not len(nodes):
        print("No nodes found with role '{0}'".format(rolename))
        sys.exit(0)
    return node(*nodes)
def nodes_with_role ( rolename ) : nodes = [ n [ 'name' ] for n in lib . get_nodes_with_role ( rolename , env . chef_environment ) ] if not len ( nodes ) : print ( "No nodes found with role '{0}'" . format ( rolename ) ) sys . exit ( 0 ) return node ( * nodes )
Configures a list of nodes that have the given role in their run list