@task
def nodetype(typ):
 if (not env.hosts):
  env.hosts = ec2_utils.ListInstancesDNS(region='us-east-1', node_types=[typ], states=['running'])
 env.nodetype = typ

@ task def nodetype ( typ ) : if ( not env . hosts ) : env . hosts = ec2_utils . ListInstancesDNS ( region = 'us-east-1' , node_types = [ typ ] , states = [ 'running' ] ) env . nodetype = typ
specify node type: staging or prod .