Make inventory examples more generic

This commit is contained in:
2026-01-02 14:09:58 +01:00
parent bc6bd2823f
commit 7e4c2d87e2
2 changed files with 70 additions and 189 deletions

View File

@@ -1,40 +1,50 @@
--- ---
all: all:
vars: vars:
hypervisor: "proxmox"
install_type: "virtual" install_type: "virtual"
hypervisor: "proxmox"
install_drive: "/dev/sda" install_drive: "/dev/sda"
boot_iso: "local:iso/archlinux-x86_64.iso" boot_iso: "local:iso/archlinux-x86_64.iso"
vm_nif: "vmbr0" vm_nif: "vmbr0"
vm_gw: "10.0.0.1"
vm_dns:
- 1.1.1.1
- 1.0.0.1
vm_dns_search:
- example.com
children: children:
proxmox: proxmox:
hosts: hosts:
proxy01.example.com: app01.example.com:
ansible_host: 10.0.0.10 ansible_host: 10.0.0.10
hostname: "proxy01.example.com" hostname: "app01.example.com"
vm_id: 100
os: "archlinux" os: "archlinux"
filesystem: "btrfs" filesystem: "btrfs"
vm_memory: 4096 vm_id: 100
vm_ballo: 2048
vm_cpus: 2 vm_cpus: 2
vm_memory: 4096
vm_size: 40 vm_size: 40
vm_ip: 10.0.0.10 vm_ip: 10.0.0.10
database01.example.com: vm_nms: 24
vm_gw: 10.0.0.1
vm_dns:
- 1.1.1.1
- 1.0.0.1
extra_packages:
- jq
- tmux
db01.example.com:
ansible_host: 10.0.0.11 ansible_host: 10.0.0.11
hostname: "database01.example.com" hostname: "db01.example.com"
vm_id: 101
os: "rhel9" os: "rhel9"
filesystem: "xfs" filesystem: "xfs"
vm_memory: 4096 vm_id: 101
vm_ballo: 2048
vm_cpus: 4 vm_cpus: 4
vm_size: 60 vm_memory: 8192
vm_size: 80
vm_ip: 10.0.0.11 vm_ip: 10.0.0.11
vm_nms: 24
vm_gw: 10.0.0.1
vm_dns: "1.1.1.1,1.0.0.1"
rhel_iso: "local:iso/rhel-9.4-x86_64-dvd.iso" rhel_iso: "local:iso/rhel-9.4-x86_64-dvd.iso"
luks_enabled: true
luks_passphrase: "CHANGE_ME"
luks_auto_decrypt_method: "keyfile"
luks_keyfile_size: 128
cis: true
selinux: false
firewalld_enabled: false

View File

@@ -1,185 +1,56 @@
--- ---
all: all:
vars: vars:
hypervisor: "libvirt"
install_type: "virtual" install_type: "virtual"
hypervisor: "libvirt"
install_drive: "/dev/vda" install_drive: "/dev/vda"
boot_iso: "/var/lib/libvirt/images/archlinux-x86_64.iso" boot_iso: "/var/lib/libvirt/images/archlinux-x86_64.iso"
rhel_iso: "/var/lib/libvirt/images/rhel-9.4-x86_64-dvd.iso"
vm_cpus: 2
vm_memory: 4096
vm_size: 30
vm_nms: 24
vm_gw: 192.168.122.1
vm_dns: 1.1.1.1
children: children:
libvirt: libvirt:
hosts: hosts:
archlinux-luks: web01.example.com:
ansible_host: 192.168.122.100 ansible_host: 192.168.122.10
hostname: "archlinux-luks" hostname: "web01.example.com"
os: "archlinux"
filesystem: "btrfs"
vm_ip: 192.168.122.100
luks_enabled: true
archlinux-plain:
ansible_host: 192.168.122.101
hostname: "archlinux-plain"
os: "archlinux"
filesystem: "ext4"
vm_ip: 192.168.122.101
luks_enabled: false
almalinux-luks:
ansible_host: 192.168.122.102
hostname: "almalinux-luks"
os: "almalinux"
filesystem: "xfs"
vm_ip: 192.168.122.102
luks_enabled: true
almalinux-plain:
ansible_host: 192.168.122.103
hostname: "almalinux-plain"
os: "almalinux"
filesystem: "ext4"
vm_ip: 192.168.122.103
luks_enabled: false
debian11-luks:
ansible_host: 192.168.122.104
hostname: "debian11-luks"
os: "debian11"
filesystem: "ext4"
vm_ip: 192.168.122.104
luks_enabled: true
debian11-plain:
ansible_host: 192.168.122.105
hostname: "debian11-plain"
os: "debian11"
filesystem: "xfs"
vm_ip: 192.168.122.105
luks_enabled: false
debian12-luks:
ansible_host: 192.168.122.106
hostname: "debian12-luks"
os: "debian12"
filesystem: "btrfs"
vm_ip: 192.168.122.106
luks_enabled: true
debian12-plain:
ansible_host: 192.168.122.107
hostname: "debian12-plain"
os: "debian12" os: "debian12"
filesystem: "ext4" filesystem: "ext4"
vm_ip: 192.168.122.107 vm_cpus: 2
luks_enabled: false vm_memory: 2048
debian13-luks: vm_size: 30
ansible_host: 192.168.122.108 vm_ip: 192.168.122.10
hostname: "debian13-luks" vm_nms: 24
os: "debian13" vm_gw: 192.168.122.1
filesystem: "btrfs" vm_dns: 1.1.1.1
vm_ip: 192.168.122.108 extra_packages:
luks_enabled: true - nginx
debian13-plain: - fail2ban
ansible_host: 192.168.122.109 vault01.example.com:
hostname: "debian13-plain" ansible_host: 192.168.122.11
os: "debian13" hostname: "vault01.example.com"
filesystem: "xfs"
vm_ip: 192.168.122.109
luks_enabled: false
fedora-luks:
ansible_host: 192.168.122.110
hostname: "fedora-luks"
os: "fedora"
filesystem: "btrfs"
vm_ip: 192.168.122.110
luks_enabled: true
fedora-plain:
ansible_host: 192.168.122.111
hostname: "fedora-plain"
os: "fedora"
filesystem: "xfs"
vm_ip: 192.168.122.111
luks_enabled: false
rhel8-luks:
ansible_host: 192.168.122.112
hostname: "rhel8-luks"
os: "rhel8"
filesystem: "ext4"
vm_ip: 192.168.122.112
luks_enabled: true
rhel8-plain:
ansible_host: 192.168.122.113
hostname: "rhel8-plain"
os: "rhel8"
filesystem: "ext4"
vm_ip: 192.168.122.113
luks_enabled: false
rhel9-luks:
ansible_host: 192.168.122.114
hostname: "rhel9-luks"
os: "rhel9"
filesystem: "xfs"
vm_ip: 192.168.122.114
luks_enabled: true
rhel9-plain:
ansible_host: 192.168.122.115
hostname: "rhel9-plain"
os: "rhel9"
filesystem: "ext4"
vm_ip: 192.168.122.115
luks_enabled: false
rhel10-luks:
ansible_host: 192.168.122.116
hostname: "rhel10-luks"
os: "rhel10"
filesystem: "xfs"
vm_ip: 192.168.122.116
luks_enabled: true
rhel10-plain:
ansible_host: 192.168.122.117
hostname: "rhel10-plain"
os: "rhel10"
filesystem: "ext4"
vm_ip: 192.168.122.117
luks_enabled: false
rocky-luks:
ansible_host: 192.168.122.118
hostname: "rocky-luks"
os: "rocky"
filesystem: "xfs"
vm_ip: 192.168.122.118
luks_enabled: true
rocky-plain:
ansible_host: 192.168.122.119
hostname: "rocky-plain"
os: "rocky"
filesystem: "ext4"
vm_ip: 192.168.122.119
luks_enabled: false
ubuntu-luks:
ansible_host: 192.168.122.120
hostname: "ubuntu-luks"
os: "ubuntu"
filesystem: "btrfs"
vm_ip: 192.168.122.120
luks_enabled: true
ubuntu-plain:
ansible_host: 192.168.122.121
hostname: "ubuntu-plain"
os: "ubuntu"
filesystem: "ext4"
vm_ip: 192.168.122.121
luks_enabled: false
ubuntu-lts-luks:
ansible_host: 192.168.122.122
hostname: "ubuntu-lts-luks"
os: "ubuntu-lts" os: "ubuntu-lts"
filesystem: "btrfs" filesystem: "btrfs"
vm_ip: 192.168.122.122 vm_cpus: 2
vm_memory: 4096
vm_size: 40
vm_ip: 192.168.122.11
vm_nms: 24
vm_gw: 192.168.122.1
vm_dns_search: "example.com"
luks_enabled: true luks_enabled: true
ubuntu-lts-plain: luks_passphrase: "CHANGE_ME"
ansible_host: 192.168.122.123 luks_auto_decrypt_method: "keyfile"
hostname: "ubuntu-lts-plain" firewalld_enabled: false
os: "ubuntu-lts" rhel9.example.com:
filesystem: "ext4" ansible_host: 192.168.122.12
vm_ip: 192.168.122.123 hostname: "rhel9.example.com"
luks_enabled: false os: "rhel9"
filesystem: "xfs"
vm_cpus: 4
vm_memory: 8192
vm_size: 80
vm_ip: 192.168.122.12
vm_nms: 24
vm_gw: 192.168.122.1
vm_dns: "1.1.1.1,1.0.0.1"
vm_path: "/srv/libvirt/images"
rhel_iso: "/var/lib/libvirt/images/rhel-9.4-x86_64-dvd.iso"
vlan_name: "100"