Mercurial > code > home > repos > infra
view pi-setup/tasks.py @ 313:b3acb9fff274
updates for new ga-iot (pi reformat of host=garage)
author | drewp@bigasterisk.com |
---|---|
date | Mon, 23 Sep 2024 00:32:36 -0700 |
parents | 3af02e24eaf9 |
children | 4d1b6a6e65d2 |
line wrap: on
line source
from invoke import task cmd = ''' HOME=/root export HOME eval `keychain --quiet --eval id_ecdsa` ''' @task def init_workspace(ctx): ctx.run(cmd + 'pdm run -p .. setup_pi.py --init', pty=True) @task def setup_pi(ctx, hostname, serial): ctx.run("qemu-img --version") # fail fast ctx.run(cmd + f'pdm run -p .. setup_pi.py {hostname} {serial}', pty=True) @task def iscsi(ctx, hostname): ctx.run(cmd + f'pdm run -p .. setup_pi.py --iscsi {hostname}', pty=True)