Mercurial > code > home > repos > infra
comparison tasks.py @ 5:7e8c7de5b490
port wireguard setup
author | drewp@bigasterisk.com |
---|---|
date | Wed, 10 Nov 2021 09:51:54 -0800 |
parents | 61945df2a392 |
children | b6fff51f8676 |
comparison
equal
deleted
inserted
replaced
4:53ab69ba2d07 | 5:7e8c7de5b490 |
---|---|
5 export HOME | 5 export HOME |
6 eval `keychain --quiet --eval id_ecdsa` | 6 eval `keychain --quiet --eval id_ecdsa` |
7 cd /my/proj/infra | 7 cd /my/proj/infra |
8 env/bin/pyinfra ''' | 8 env/bin/pyinfra ''' |
9 | 9 |
10 | |
10 @task | 11 @task |
11 def users(ctx): | 12 def users(ctx): |
12 ctx.run(cmd + 'inventory.py users.py', pty=True) | 13 ctx.run(cmd + 'inventory.py users.py', pty=True) |
14 | |
13 | 15 |
14 @task | 16 @task |
15 def system(ctx): | 17 def system(ctx): |
16 ctx.run(cmd + 'inventory.py system.py', pty=True) | 18 ctx.run(cmd + 'inventory.py system.py', pty=True) |
17 | 19 |
20 | |
21 @task | |
22 def wireguard(ctx): | |
23 ctx.run(cmd + 'inventory.py wireguard.py', pty=True) | |
24 | |
25 | |
18 @task | 26 @task |
19 def get_fact(ctx, host='dash', fact='server.LinuxDistribution'): | 27 def get_fact(ctx, host='dash', fact='server.LinuxDistribution'): |
20 ctx.run(cmd + f'{host} fact {fact}', pty=True) | 28 ctx.run(cmd + f'{host} fact {fact}', pty=True) |