allow specifying node in proxmox bash scripts

Signed-off-by: Kiara Grouwstra <kiara@procolix.eu>
This commit is contained in:
Kiara Grouwstra 2025-09-22 21:20:49 +02:00
parent f076e5653d
commit 4cfe91bcbd
Signed by: kiara
SSH key fingerprint: SHA256:COspvLoLJ5WC5rFb9ZDe5urVCkK4LJZOsjfF4duRJFU
2 changed files with 4 additions and 2 deletions

View file

@ -7,7 +7,7 @@ set -euC
## FIXME: There seems to be a problem with file upload where the task is ## FIXME: There seems to be a problem with file upload where the task is
## registered to `node051` no matter what node we are actually uploading to? For ## registered to `node051` no matter what node we are actually uploading to? For
## now, let us just use `node051` everywhere. ## now, let us just use `node051` everywhere.
readonly node=node051 node=node051
readonly tmpdir=/tmp/proxmox-provision-$RANDOM readonly tmpdir=/tmp/proxmox-provision-$RANDOM
mkdir $tmpdir mkdir $tmpdir
@ -69,6 +69,7 @@ while [ $# -gt 0 ]; do
--api-url|--api_url) readonly api_url="$1"; shift ;; --api-url|--api_url) readonly api_url="$1"; shift ;;
--username) readonly username="$1"; shift ;; --username) readonly username="$1"; shift ;;
--password) readonly password="$1"; shift ;; --password) readonly password="$1"; shift ;;
--node) readonly node="$1"; shift ;;
--debug) debug=true ;; --debug) debug=true ;;

View file

@ -7,7 +7,7 @@ set -euC
## FIXME: There seems to be a problem with file upload where the task is ## FIXME: There seems to be a problem with file upload where the task is
## registered to `node051` no matter what node we are actually uploading to? For ## registered to `node051` no matter what node we are actually uploading to? For
## now, let us just use `node051` everywhere. ## now, let us just use `node051` everywhere.
readonly node=node051 node=node051
readonly tmpdir=/tmp/proxmox-remove-$RANDOM readonly tmpdir=/tmp/proxmox-remove-$RANDOM
mkdir $tmpdir mkdir $tmpdir
@ -59,6 +59,7 @@ while [ $# -gt 0 ]; do
--api-url|--api_url) readonly api_url="$1"; shift ;; --api-url|--api_url) readonly api_url="$1"; shift ;;
--username) readonly username=$1; shift ;; --username) readonly username=$1; shift ;;
--password) readonly password=$1; shift ;; --password) readonly password=$1; shift ;;
--node) readonly node="$1"; shift ;;
-h|-\?|--help) help; exit 0 ;; -h|-\?|--help) help; exit 0 ;;