~lindsay/fabric-example

ref: d125035a66dc2cb679cdae0da788463e9b99331b fabric-example/submodule.py -rw-r--r-- 267 bytes
d125035a — LindsayTouho Fabric nameserver and submodule 1 year, 9 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from invoke import Collection
from fabric import task, Connection
from log import logger

subc = Collection('subc')

@task
def sub_task(c):
    """task in submodule"""
    c.run('hostname')
    logger.info('sub-task done')
    
subc.add_task(sub_task, name='subt')