Skip to content

Instantly share code, notes, and snippets.

@potix2
Created October 25, 2012 07:16
Show Gist options
  • Save potix2/3951125 to your computer and use it in GitHub Desktop.
Save potix2/3951125 to your computer and use it in GitHub Desktop.
fabric runs_once test
from fabric.api import env, task
from fabric.decorators import runs_once
env.hosts = ['host1','host2','host3']
@runs_once
def _pull():
print "pull artifacts"
@task
def deploy():
_pull()
print("deploying on %s" % env.host_string)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment