@task
def vagrant():
 vc = get_vagrant_config()
 env.user = vc['User']
 env.hosts = [('%s:%s' % (vc['HostName'], vc['Port']))]
 env.key_filename = vc['IdentityFile'].strip('"')
 env.forward_agent = (vc.get('ForwardAgent', 'no') == 'yes')

@ task def vagrant ( ) : vc = get_vagrant_config ( ) env . user = vc [ 'User' ] env . hosts = [ ( '%s:%s' % ( vc [ 'HostName' ] , vc [ 'Port' ] ) ) ] env . key_filename = vc [ 'IdentityFile' ] . strip ( '"' ) env . forward_agent = ( vc . get ( 'ForwardAgent' , 'no' ) == 'yes' )
run the following tasks on a vagrant box .