Mercurial > code > home > repos > infra
comparison pi-setup/tasks.py @ 279:1cb4aeec8fc6
pi_setup code to prepare a pi for netboot
author | drewp@bigasterisk.com |
---|---|
date | Sun, 14 Apr 2024 20:54:35 -0700 |
parents | |
children | 957eb07e06e6 |
comparison
equal
deleted
inserted
replaced
278:4e424a144183 | 279:1cb4aeec8fc6 |
---|---|
1 from invoke import task | |
2 | |
3 cmd = ''' | |
4 HOME=/root | |
5 export HOME | |
6 eval `keychain --quiet --eval id_ecdsa` | |
7 ''' | |
8 | |
9 @task | |
10 def init_workspace(ctx): | |
11 ctx.run(cmd + 'pdm run -p .. setup_pi.py --init', pty=True) | |
12 | |
13 @task | |
14 def setup_pi(ctx, hostname, serial): | |
15 ctx.run(cmd + f'pdm run -p .. setup_pi.py {hostname} {serial}', pty=True) |