Refactoring + final touches

This commit is contained in:
Francesco Zimbolo
2026-04-24 12:58:56 +00:00
parent 6f6cc10aae
commit d8b60d10e0
16 changed files with 369 additions and 106 deletions

View File

@@ -0,0 +1,70 @@
---
# ============================================================
# Proxmox Post-Install - Group Variables Template
# Copy this to your inventory folder as group_vars/all.yml
# ============================================================
# --- Deployment Toggles ---
# standalone_mode: Set to true to skip ALL cluster and Linstor tasks,
# even when the inventory contains multiple nodes (useful for independent nodes per customer).
standalone_mode: false
# deploy_linstor: Set to true to install and configure Linstor + DRBD storage.
# Requires at least 3 nodes and standalone_mode: false.
deploy_linstor: false
# disable_ipv6: Set to true to disable IPv6 system-wide via sysctl.
# Useful when IPv6 is unrouted and causes connection timeouts (e.g. apt, curl).
disable_ipv6: false
# wipe_linstor_disks: Set to true to wipe partition tables and signatures from raw block devices
# before creating LVM VGs. Only affects targets defined as /dev/... paths.
# WARNING: destructive — only set on first deployment, never on a running cluster.
wipe_linstor_disks: false
# --- Proxmox Cluster ---
pve_cluster_name: "example-cluster"
# pve_enterprise_key: "" # Optional: global key (prefer per-host key in hosts.ini)
# --- Linstor / LINBIT Repository ---
# Auto-calculated as: Debian major version - 4 (e.g. Debian 13 = proxmox-9).
# Override manually if LINBIT publishes a differently-named repo for new Proxmox versions.
# linbit_proxmox_version: 9
# --- Linstor HA Controller ---
# ha_pool: Name of the Linstor storage pool to use for the controller HA volume.
ha_pool: "fast_pool_1"
# ha_vip: Virtual IP that follows the active Linstor controller across nodes.
ha_vip: "192.168.2.4"
# ha_vip_cidr: Prefix length for the VIP address (e.g. 24 for /24).
ha_vip_cidr: "24"
# --- Linstor Storage Pools ---
# Each entry defines one Resource Group, composed of one storage pool per node.
# All pools in the same entry share the same pool_name across nodes.
#
# TARGET RULES:
# - Use a raw block device path (/dev/sdb) to auto-create VG + LVM Thin Pool.
# - Use an existing thin-pool path (vg_name/thin_name, e.g. "pve/data") to register
# an already-existing LVM thin pool WITHOUT touching existing data.
#
# Keys under "targets" must match the Ansible inventory_hostname of each node
# (i.e. the left-hand label in hosts.ini, e.g. "pve-node-01").
linstor_storage_pools:
- pool_name: "fast_pool_1"
rg_name: "fast_pool_1"
vg_name: "pve"
thin_name: "data"
targets:
pve-node-01: "pve/data" # Register existing pve/data thin pool
pve-node-02: "pve/data"
pve-node-03: "pve/data"
- pool_name: "slow_pool_1"
rg_name: "slow_pool_1"
vg_name: "sp1"
thin_name: "data"
targets:
pve-node-01: "/dev/sdb" # Format /dev/sdb as VG sp1 + thin pool data
pve-node-02: "/dev/sdb"
pve-node-03: "/dev/sdb"

View File

@@ -1,37 +0,0 @@
---
# Deployment Toggles
standalone_mode: true # Set to true to bypass all Corosync/Linstor tasks for independent nodes
deploy_linstor: false # Set to true to install and configure Linstor/DRBD
# Proxmox Cluster Configuration
pve_cluster_name: "example-cluster"
# High Availability Controller Configuration
ha_pool: "fast_pool_1"
ha_vip: "192.168.2.4"
ha_vip_cidr: "29"
# Linstor Storage Pools Configuration
# You can add or remove pools as needed
# TARGET RULES:
# Use raw disk (/dev/sdb) to wipe/create LVM
# Use existing thin-pool path (pve/data) to register safely (data won't be deleted)
linstor_storage_pools:
- pool_name: "fast_pool_1"
rg_name: "fast_pool_1"
vg_name: "pve"
thin_name: "data"
targets:
pve-node-01: "pve/data"
pve-node-02: "pve/data"
pve-node-03: "pve/data"
- pool_name: "slow_pool_1"
rg_name: "slow_pool_1"
vg_name: "sp1"
thin_name: "data"
targets:
pve-node-01: "/dev/sda"
pve-node-02: "/dev/sda"
pve-node-03: "/dev/sda"