mirror of
https://github.com/GoodOlClint/PSProxmoxVE.git
synced 2026-08-27 15:36:57 +00:00
feat(infra): add Terraform config for nested PVE test VM
Provisions a throwaway nested Proxmox VE instance on an existing host using bpg/proxmox provider. Includes unattended install via answer file, API wait script, and automatic API token creation. Designed for CI-driven integration test environments. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Executable
+22
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
HOST="$1"
|
||||
PORT="${2:-8006}"
|
||||
MAX_WAIT="${3:-600}"
|
||||
INTERVAL=10
|
||||
|
||||
echo "Waiting for PVE API at https://${HOST}:${PORT}..."
|
||||
elapsed=0
|
||||
while [ $elapsed -lt $MAX_WAIT ]; do
|
||||
if curl -sk --connect-timeout 5 "https://${HOST}:${PORT}/api2/json/version" 2>/dev/null | grep -q '"version"'; then
|
||||
echo "PVE API is responsive after ${elapsed}s"
|
||||
exit 0
|
||||
fi
|
||||
echo " Not ready yet (${elapsed}s elapsed)..."
|
||||
sleep $INTERVAL
|
||||
elapsed=$((elapsed + INTERVAL))
|
||||
done
|
||||
|
||||
echo "ERROR: PVE API not responsive after ${MAX_WAIT}s"
|
||||
exit 1
|
||||
Reference in New Issue
Block a user