view pi-setup/tasks.py @ 281:957eb07e06e6

iscsi-mount mode, for inspecting the iscsi fs
author drewp@bigasterisk.com
date Mon, 15 Apr 2024 00:04:41 -0700
parents 1cb4aeec8fc6
children 3af02e24eaf9
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(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)