comparison tasks.py @ 12:15c5ce7c74b5

refactor, cleanup, split large deploys
author drewp@bigasterisk.com
date Thu, 11 Nov 2021 23:31:21 -0800
parents 226f3c8419b2
children ac4d24d01b68
comparison
equal deleted inserted replaced
11:82e46d7ff527 12:15c5ce7c74b5
12 def users(ctx): 12 def users(ctx):
13 ctx.run(cmd + 'inventory.py users.py', pty=True) 13 ctx.run(cmd + 'inventory.py users.py', pty=True)
14 14
15 15
16 @task 16 @task
17 def ssh(ctx):
18 ctx.run(cmd + 'inventory.py ssh.py', pty=True)
19
20
21 @task
17 def system(ctx): 22 def system(ctx):
18 ctx.run(cmd + 'inventory.py system.py', pty=True) 23 ctx.run(cmd + 'inventory.py system.py', pty=True)
19 24
20 25
21 @task 26 @task
27 def packages(ctx):
28 ctx.run(cmd + 'inventory.py packages.py', pty=True)
29
30
31 @task
22 def net(ctx): 32 def net(ctx):
23 # workaround for https://github.com/Fizzadar/pyinfra/issues/702 33 # workaround for https://github.com/Fizzadar/pyinfra/issues/702
24 ctx.run(cmd + '-vv inventory.py exec -- rm -f /tmp/pyinfra-7ed098bf43cef74d8ab8ea095e4a95c92605c61c', pty=True) 34 ctx.run(cmd + 'inventory.py exec -- rm -f /tmp/pyinfra-7ed098bf43cef74d8ab8ea095e4a95c92605c61c', pty=True, warn=True)
25 35
26 ctx.run(cmd + '-vv inventory.py net.py --limit slash ', pty=True) 36 ctx.run(cmd + 'inventory.py net.py', pty=True)
27 37
28 38
29 @task 39 @task
30 def wireguard(ctx): 40 def wireguard(ctx):
31 ctx.run(cmd + 'inventory.py wireguard.py', pty=True) 41 ctx.run(cmd + 'inventory.py wireguard.py', pty=True)
32 42
33 43
34 @task 44 @task
35 def kube(ctx): 45 def kube(ctx):
36 ctx.run(cmd + 'inventory.py kube.py --limit dash --limit garage', pty=True) 46 ctx.run(cmd + 'inventory.py kube.py ', pty=True)
47
37 48
38 49
39 @task 50 @task
40 def get_fact(ctx, host='dash', fact='server.LinuxDistribution'): 51 def get_fact(ctx, host='dash', fact='server.LinuxDistribution'):
41 ctx.run(cmd + f'{host} -vv fact {fact}', pty=True) 52 ctx.run(cmd + f'{host} -vv fact {fact}', pty=True)