Mercurial > code > home > repos > infra
changeset 54:00d5cd21cade
save ran_all.timestamp
author | drewp@bigasterisk.com |
---|---|
date | Wed, 06 Apr 2022 19:19:09 -0700 |
parents | 8945bf71da22 |
children | d963290102a6 |
files | .hgignore tasks.py |
diffstat | 2 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgignore Wed Apr 06 19:08:57 2022 -0700 +++ b/.hgignore Wed Apr 06 19:19:09 2022 -0700 @@ -1,3 +1,4 @@ env pyinfra-debug.log secrets/ +ran_all.timestamp
--- a/tasks.py Wed Apr 06 19:08:57 2022 -0700 +++ b/tasks.py Wed Apr 06 19:19:09 2022 -0700 @@ -1,6 +1,5 @@ from invoke import task -'🛁 bang(pts/2):/my/proj/infra% sudo inv users ssh system packages net dns wireguard kube sync mail' cmd = ''' HOME=/root @@ -65,6 +64,11 @@ ctx.run(cmd + 'inventory.py mail.py ', pty=True) +@task(pre=[users, ssh, system, packages, net, dns, wireguard, kube, sync, mail]) +def all(ctx): + ctx.run('touch /my/proj/infra/ran_all.timestamp') + + @task def get_fact(ctx, host='dash', fact='server.LinuxDistribution'): ctx.run(cmd + f'{host} -vv fact {fact}', pty=True)