Mercurial > code > home > repos > infra
view tasks.py @ 23:67fc0d4b1859
dead code
author | drewp@bigasterisk.com |
---|---|
date | Tue, 28 Dec 2021 22:10:02 -0800 |
parents | c5784e3d4f8d |
children | d4fb38f13c79 |
line wrap: on
line source
from invoke import task cmd = ''' HOME=/root export HOME eval `keychain --quiet --eval id_ecdsa` cd /my/proj/infra env/bin/pyinfra ''' @task def users(ctx): ctx.run(cmd + 'inventory.py users.py', pty=True) @task def ssh(ctx): ctx.run(cmd + 'inventory.py ssh.py', pty=True) @task def system(ctx): ctx.run(cmd + 'inventory.py system.py', pty=True) @task def packages(ctx): ctx.run(cmd + 'inventory.py packages.py', pty=True) @task def net(ctx): ctx.run(cmd + 'inventory.py net.py -v --limit prime', pty=True) @task def wireguard(ctx): ctx.run(cmd + 'inventory.py wireguard.py', pty=True) @task def kube(ctx): ctx.run(cmd + 'inventory.py kube.py ', pty=True) @task def sync(ctx): ctx.run(cmd + 'inventory.py sync.py ', pty=True) @task def mail(ctx): ctx.run(cmd + 'inventory.py mail.py -vv', pty=True) @task def get_fact(ctx, host='dash', fact='server.LinuxDistribution'): ctx.run(cmd + f'{host} -vv fact {fact}', pty=True)