Commit Graph

3 Commits

Author SHA1 Message Date
Maarten a44458ae0c Fix proxmox-setup: heredoc detection, dry_run_guard, set -e traps
Three bugs that caused the script to exit silently or behave wrong:

1. SSH detection used a double-quoted string with nested Python/awk
   containing $ and " characters that bash tried to expand locally.
   Switched to a quoted heredoc (<<'DETECT') so the entire remote
   script is passed literally.

2. dry_run_guard had return values swapped: returned 0 (success) when
   NOT in dry-run, causing apply functions to skip real work. Now
   returns 0 when DRY_RUN=true so "if dry_run_guard; then return; fi"
   correctly short-circuits.

3. Multiple "[[ test ]] && action" patterns outside if-conditions
   return 1 when the test is false, triggering set -e to abort.
   Converted all to "if [[ test ]]; then action; fi" form.

Also fixed Python any() pattern: "any(...) and print('yes')" never
prints "no" — replaced with print("yes" if any(...) else "no").

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 16:35:37 +01:00
Maarten 513d7cd0c6 Rewrite proxmox-setup with full state detection and status dashboard
The script now does a comprehensive single-pass detection of the host
state (repos, nag patch, packages, bridge, forwarding, NAT, storage,
WireGuard, firewall, API role/pool/token) and displays a status dashboard
showing what's done vs. what needs attention. Only pending items are
offered for configuration. Already-done steps are skipped automatically.

Partial states are handled too: e.g. bridge exists but NAT not active,
or repos switched but nag popup still present.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 16:22:36 +01:00
Maarten a7c856121d Add Hetzner bare metal setup guide, proxmox-setup script, and multi-target config layout
New hetzner/ directory with step-by-step Proxmox setup guide (networking,
WireGuard, firewall, storage, API tokens) and an interactive helper script
that automates all steps over SSH.

New incusos/targets/ layout with per-host connection configs and lab
definitions for beelink and hetzner targets. No changes to incusos-proxmox
itself -- uses existing --proxmox flag.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 15:52:57 +01:00