pip install fabric
python
from fabric import Connection, task
python
@task
def task1(c):
c.run('echo Task 1')
@task
def task2(c):
c.run('echo Task 2')
python
@task
def main_task(c):
group = [
task1,
task2
]
results = conn.run_tasks(group)
fab main_task
python
from fabric import Connection, task
@task
def task1(c):
c.run('echo Task 1')
@task
def task2(c):
c.run('echo Task 2')
@task
def main_task(c):
group = [
task1,
task2
]
results = conn.run_tasks(group)