docu(readme): document dict-based variables and examples

This commit is contained in:
2026-02-11 05:37:18 +01:00
parent fcc7c6aeb6
commit a9db85d45e
4 changed files with 326 additions and 117 deletions

View File

@@ -1,65 +1,126 @@
---
all:
vars:
install_type: "virtual"
hypervisor:
type: "libvirt"
install_drive: "/dev/vda"
url: "localhost"
username: ""
password: ""
host: ""
storage: "default"
boot_iso: "/var/lib/libvirt/images/archlinux-x86_64.iso"
children:
libvirt:
hosts:
web01.example.com:
ansible_host: 192.168.122.10
os: "debian"
os_version: "12"
web01.local:
ansible_host: 192.168.122.20
filesystem: "ext4"
system:
name: "web01.example.com"
type: "virtual"
os: "debian"
os_version: "12"
name: "web01.local"
cpus: 2
memory_mb: 2048
ip: 192.168.122.10
memory: 2048
network: "default"
ip: 192.168.122.20
prefix: 24
gateway: 192.168.122.1
dns_servers: 1.1.1.1
dns:
servers:
- 1.1.1.1
search:
- lab.local
path: "/var/lib/libvirt/images"
disks:
- size: 30
extra_packages:
- nginx
- fail2ban
vault01.example.com:
ansible_host: 192.168.122.11
os: "ubuntu-lts"
- size: 80
mount:
path: /var/www
fstype: xfs
user:
name: "web"
password: "CHANGE_ME"
public_key: "ssh-ed25519 AAAA..."
root:
password: "CHANGE_ME"
packages:
- nginx
- curl
features:
firewall:
enabled: true
backend: "ufw"
toolkit: "nftables"
db01.local:
ansible_host: 192.168.122.21
filesystem: "xfs"
rhel_iso: "/var/lib/libvirt/images/rhel-9.4-x86_64-dvd.iso"
system:
type: "virtual"
os: "rhel"
os_version: "9"
name: "db01.local"
cpus: 4
memory: 4096
network: "default"
ip: 192.168.122.21
prefix: 24
gateway: 192.168.122.1
dns:
servers:
- 9.9.9.9
search:
- example.com
disks:
- size: 60
- size: 120
mount:
path: /data
fstype: ext4
user:
name: "db"
password: "CHANGE_ME"
public_key: "ssh-ed25519 AAAA..."
root:
password: "CHANGE_ME"
luks:
enabled: true
passphrase: "CHANGE_ME"
auto_decrypt_method: "keyfile"
features:
firewall:
enabled: false
backend: "firewalld"
toolkit: "nftables"
compute01.local:
ansible_host: 192.168.122.22
filesystem: "btrfs"
system:
name: "vault01.example.com"
cpus: 2
memory_mb: 4096
ip: 192.168.122.11
type: "virtual"
os: "fedora"
os_version: "41"
name: "compute01.local"
cpus: 8
memory: 8192
network: "default"
ip: 192.168.122.22
prefix: 24
gateway: 192.168.122.1
dns_search: "example.com"
disks:
- size: 40
luks_enabled: true
luks_passphrase: "CHANGE_ME"
luks_auto_decrypt_method: "keyfile"
firewall_enabled: false
rhel9.example.com:
ansible_host: 192.168.122.12
os: "rhel"
os_version: "9"
filesystem: "xfs"
system:
name: "rhel9.example.com"
cpus: 4
memory_mb: 8192
vlan: "100"
ip: 192.168.122.12
prefix: 24
gateway: 192.168.122.1
dns_servers: "1.1.1.1,1.0.0.1"
path: "/srv/libvirt/images"
dns:
servers: "1.1.1.1,1.0.0.1"
disks:
- size: 80
rhel_iso: "/var/lib/libvirt/images/rhel-9.4-x86_64-dvd.iso"
- size: 200
mount:
path: /data
fstype: btrfs
user:
name: "compute"
password: "CHANGE_ME"
public_key: "ssh-ed25519 AAAA..."
root:
password: "CHANGE_ME"
features:
cis:
enabled: true