comparison tasks.py @ 315:2d20824d8e8b

add nowait
author drewp@bigasterisk.com
date Mon, 23 Sep 2024 00:35:13 -0700
parents be6b2695542c
children 11d3bcedb9f0
comparison
equal deleted inserted replaced
314:8a1cbc033fc1 315:2d20824d8e8b
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 + '--nowait inventory.py %s' % s, pty=True, echo=True) 12 ctx.run(cmd + '--no-wait 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, '-y', 'inventory.py'] + configs), pty=True) 115 ctx.run(' '.join([cmd, '--no-wait', '-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'):