Mercurial > code > home > repos > infra
diff tasks.py @ 3:61945df2a392
updates to work on recent raspbian installs
author | drewp@bigasterisk.com |
---|---|
date | Sun, 07 Nov 2021 15:42:37 -0800 |
parents | b664f1027992 |
children | 7e8c7de5b490 |
line wrap: on
line diff
--- a/tasks.py Thu Nov 04 18:26:04 2021 -0700 +++ b/tasks.py Sun Nov 07 15:42:37 2021 -0800 @@ -5,12 +5,16 @@ export HOME eval `keychain --quiet --eval id_ecdsa` cd /my/proj/infra -env/bin/pyinfra inventory.py ''' +env/bin/pyinfra ''' @task def users(ctx): - ctx.run(cmd + 'users.py', pty=True) + ctx.run(cmd + 'inventory.py users.py', pty=True) @task def system(ctx): - ctx.run(cmd + 'system.py', pty=True) + ctx.run(cmd + 'inventory.py system.py', pty=True) + +@task +def get_fact(ctx, host='dash', fact='server.LinuxDistribution'): + ctx.run(cmd + f'{host} fact {fact}', pty=True)