Mercurial > code > home > repos > infra
comparison tasks.py @ 310:be6b2695542c
pyinfra update and flags change
author | drewp@bigasterisk.com |
---|---|
date | Mon, 16 Sep 2024 20:10:39 -0700 |
parents | 3af02e24eaf9 |
children | 2d20824d8e8b |
comparison
equal
deleted
inserted
replaced
309:f17d9925a2aa | 310:be6b2695542c |
---|---|
7 cd /my/proj/infra | 7 cd /my/proj/infra |
8 pdm run pyinfra ''' | 8 pdm run pyinfra ''' |
9 | 9 |
10 | 10 |
11 def _run(ctx, s): | 11 def _run(ctx, s): |
12 ctx.run(cmd + 'inventory.py %s' % s, pty=True, echo=True) | 12 ctx.run(cmd + '--nowait inventory.py %s' % s, pty=True, echo=True) |
13 | 13 |
14 | 14 |
15 @task | 15 @task |
16 def users(ctx): | 16 def users(ctx): |
17 _run(ctx, 'users.py') | 17 _run(ctx, 'users.py') |
110 'kube.py', | 110 'kube.py', |
111 'sync.py', | 111 'sync.py', |
112 'mail.py', | 112 'mail.py', |
113 'home.py', | 113 'home.py', |
114 ] | 114 ] |
115 ctx.run(' '.join([cmd, 'inventory.py'] + configs), pty=True) | 115 ctx.run(' '.join([cmd, '-y', 'inventory.py'] + configs), pty=True) |
116 ctx.run('touch /my/proj/infra/ran_all.timestamp') | 116 ctx.run('touch /my/proj/infra/ran_all.timestamp') |
117 | 117 |
118 | 118 |
119 @task | 119 @task |
120 def get_fact(ctx, host='dash', fact='server.LinuxDistribution'): | 120 def get_fact(ctx, host='dash', fact='server.LinuxDistribution'): |