# 02 - Configuring the Cluster Cluster configurations are segmented per project/customer using Ansible inventories. Do not edit variables in the root directory. ## 1. Create the Environment Copy the template directory for your specific project: ```bash cp -r inventories/_template inventories/ mv inventories//hosts.yml.example inventories//hosts.yml mv inventories//group_vars/all.yml.example inventories//group_vars/all.yml ``` ## 2. Configure `hosts.yml` Define the target PVE nodes. Ansible defaults to the `ansible_host` IP for Corosync and DRBD replication. If a dedicated backend network is available, define `priv_ip`. Ansible uses conditional fallback logic automatically. ```yaml all: children: proxmox: hosts: pve-node-01: ansible_host: 192.168.1.11 priv_ip: 10.0.0.11 ``` ## 3. Configure `group_vars/all.yml` * **Deployment Toggles:** Set `deploy_linstor: true` for HCI setups, or `false` for traditional SAN integration. * **Enterprise Licensing:** Supply a key in `pve_enterprise_key`. If empty (`""`), the playbook applies the `pve-no-subscription` repository. * **HA Controller:** Define `ha_pool`, `ha_vip` (Virtual IP), and the CIDR prefix for the Linstor DB promoter. * **Storage Pools:** * If mapping a raw disk (`/dev/sda`), the playbook invokes `community.general.lvg` to create the VG/Thin Pool. * If mapping an existing path (`pve/data`), LVM tasks are skipped, and the target is registered directly in Linstor.