comparison tasks.py @ 60:a949704defd0

new pyinfra
author drewp@bigasterisk.com
date Sun, 01 May 2022 23:31:20 -0700
parents fa7a71b8a97f
children b46df76991b6
comparison
equal deleted inserted replaced
59:fa7a71b8a97f 60:a949704defd0
66 @task 66 @task
67 def mail(ctx): 67 def mail(ctx):
68 ctx.run(cmd + 'inventory.py mail.py ', pty=True) 68 ctx.run(cmd + 'inventory.py mail.py ', pty=True)
69 69
70 70
71 @task(pre=[users, ssh, system, packages, net, dns, wireguard, kube, sync, mail]) 71 @task
72 def all(ctx): 72 def all(ctx):
73 configs = [
74 'users.py',
75 'ssh.py',
76 'system.py',
77 'packages.py',
78 'net.py',
79 'dns.py',
80 'wireguard.py',
81 'kube.py',
82 'sync.py',
83 'mail.py',
84 ]
85 # https://github.com/Fizzadar/pyinfra/issues/787
86 #ctx.run(' '.join([cmd, 'inventory.py'] + configs), pty=True)
87 for c in configs:
88 ctx.run(' '.join([cmd, 'inventory.py', c]), pty=True, warn=True)
73 ctx.run('touch /my/proj/infra/ran_all.timestamp') 89 ctx.run('touch /my/proj/infra/ran_all.timestamp')
74 90
75 91
76 @task 92 @task
77 def get_fact(ctx, host='dash', fact='server.LinuxDistribution'): 93 def get_fact(ctx, host='dash', fact='server.LinuxDistribution'):