Example of creating a "supertask" in Fabric. The tasks spawns a couple of smaller tasks.
This file contains 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 * | |
| from __future__ import print_function | |
| @task | |
| def supertask(): | |
| execute(create_user) | |
| execute(deploy) | |
| @task | |
| @host('root@host') | |
| def create_user(): | |
| print("Creating user...") | |
| @task | |
| @host('user@host') | |
| def deploy(): | |
| print("Deploying...") |
This file contains 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
| fab supertask |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment