Last active
September 6, 2019 05:59
-
-
Save mgedmin/e9864045697c37d9722f to your computer and use it in GitHub Desktop.
Example of multiple environments in Fabric 1.x
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from fabric.api import env, task, sudo | |
@task | |
def staging(): | |
env.hosts.append('staging.example.com') | |
@task | |
def production(): | |
env.hosts.append('production.example.com') | |
@task | |
def restart(): | |
sudo('service myapp restart') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment