sync: Inventory-Realabgleich + neue host_vars/roles/playbooks

Nachgezogener Arbeitsstand des Homelabs:
- neue host_vars (k3s-*, gluster-*, docmost, paperless, kometa, thelounge, satisfactory, wolfstack-vm)
- neue Rollen/Playbooks (net_watchdog, patchmon-agent, tc_ratelimit, sops-age, rotate-ssh-key, dns-doh, remove-postfix, checkrr-deploy)
- diverse Rollen-Updates (base, borg, dns_resolver, frp_client, hawser, nvidia)

Ausgeklammert (bleiben uncommittet): host_vars/docmost/vars.yml (Klartext-Token -> sollte vault-konform via vault_* referenziert werden).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Sascha 2026-06-15 21:26:39 +02:00 committed by sascha
parent d857b72cf8
commit bc765668a6
52 changed files with 780 additions and 222 deletions

View file

@ -1,5 +1,5 @@
#!/bin/bash
set -e
#set -e
# ============================================================
# Debian Unattended ISO Builder
@ -20,7 +20,7 @@ DNS="1.1.1.1"
HOSTNAME="debian"
USER="sascha"
PASSWORD=""
SSH_KEY_FILE="$HOME/.ssh/id_ed25519.pub"
SSH_KEY="ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBuZvobGuzkiukW9urE7ub2v9O2zri9QhvWUZocOVxN0 sascha@pfannkuchen-2026"
OUTPUT_DIR="$SCRIPT_DIR/output"
NODE=""
VMID=""
@ -49,7 +49,6 @@ Optional:
--hostname NAME Hostname (default: debian)
--user USER Username (default: sascha)
--password PASS Password (will be prompted if not set)
--ssh-key FILE SSH public key file (default: ~/.ssh/id_ed25519.pub)
--output DIR Output directory (default: ./output)
--debian-version VER Debian version (default: 13)
@ -80,7 +79,6 @@ while [[ $# -gt 0 ]]; do
--hostname) HOSTNAME="$2"; shift 2;;
--user) USER="$2"; shift 2;;
--password) PASSWORD="$2"; shift 2;;
--ssh-key) SSH_KEY_FILE="$2"; shift 2;;
--output) OUTPUT_DIR="$2"; shift 2;;
--debian-version) DEBIAN_VERSION="$2"; shift 2;;
--node) NODE="$2"; shift 2;;
@ -126,13 +124,7 @@ if [[ -z "$PASSWORD" ]]; then
fi
PASSWORD_HASH=$(echo "$PASSWORD" | openssl passwd -6 -stdin)
# --- SSH Key ---
if [[ -f "$SSH_KEY_FILE" ]]; then
SSH_KEY=$(cat "$SSH_KEY_FILE")
else
echo "Warning: SSH key file not found: $SSH_KEY_FILE"
SSH_KEY=""
fi
echo "SSH key: pfannkuchen-20260408"
# --- Download Debian ISO ---
ISO_URL="https://cdimage.debian.org/debian-cd/current/${ARCH}/iso-cd/debian-${DEBIAN_VERSION}.*-${ARCH}-netinst.iso"
@ -233,7 +225,7 @@ echo "Host: $HOSTNAME"
echo "IP: $IP"
echo "Gateway: $GATEWAY"
echo "User: $USER"
echo "SSH Key: $(echo $SSH_KEY | cut -c1-40)..."
echo "SSH Key: pfannkuchen-20260408"
echo "============================================"
echo ""
if [[ -n "$PVE_HOST" ]]; then
@ -244,7 +236,12 @@ if [[ -n "$PVE_HOST" ]]; then
if [[ "$CREATE_VM" == true ]]; then
ISO_NAME="$(basename "$OUTPUT_ISO")"
STORAGE="powerstore-node${NODE}"
# Storage Logic: PowerStore for 1,3,6,7 / LVM-Thin for 2,4,5
if [[ "$NODE" =~ ^(1|3|6|7)$ ]]; then
STORAGE="powerstore-node${NODE}"
else
STORAGE="lvm-thin"
fi
PVE_NODE="node${NODE}"
# Auto-assign next free VMID if not specified