User Tools

Site Tools


buildsw:reference:fabric

Fabric Reference

Telling fabric to use a pem key

from fabric.api import *
    
env.hosts = ['host.name.com']
env.user = 'user'
env.key_filename = '/path/to/keyfile.pem'

Local commands

@task
def local_uname():
    local('uname -a')

Remote commands

@task
def remote_uname():
    run('uname -a')

Running local fabric commands just once:

buildsw/reference/fabric.txt · Last modified: 2017/05/01 12:45 by gwhiteman