Files
Ansible-Bootstrap/inventory_libvirt_example.yml
Sandwich 8071a7c56c feat(network): make interfaces[] canonical, normalize flat fields as AWX compat
Flat network fields (bridge, ip, prefix, gateway, vlan) are now converted
into a single-entry interfaces[] list during normalization. All virtualization
tasks (proxmox, vmware, libvirt, xen) and configuration (NM, Alpine, Void)
now consume system_cfg.network.interfaces exclusively for multi-NIC support.

Also fixes: user.key -> user.keys in system_cfg output, strict list-only DNS
in example inventories, removes legacy single-MAC virtualization_mac_address
default.
2026-02-12 22:17:02 +01:00

135 lines
3.5 KiB
YAML

---
all:
vars:
hypervisor:
type: "libvirt"
url: "localhost"
username: ""
password: ""
host: ""
storage: "default"
boot_iso: "/var/lib/libvirt/images/archlinux-x86_64.iso"
children:
libvirt:
hosts:
web01.local:
ansible_host: 192.168.122.20
system:
filesystem: "ext4"
type: "virtual"
os: "debian"
version: "12"
name: "web01.local"
cpus: 2
memory: 2048
network:
bridge: "default"
ip: 192.168.122.20
prefix: 24
gateway: 192.168.122.1
dns:
servers:
- 1.1.1.1
search:
- lab.local
path: "/var/lib/libvirt/images"
disks:
- size: 30
- size: 80
mount:
path: /var/www
fstype: xfs
user:
name: "web"
password: "CHANGE_ME"
keys:
- "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
rhel_iso: "/var/lib/libvirt/images/rhel-9.4-x86_64-dvd.iso"
system:
filesystem: "xfs"
type: "virtual"
os: "rhel"
version: "9"
name: "db01.local"
cpus: 4
memory: 4096
network:
bridge: "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"
keys:
- "ssh-ed25519 AAAA..."
root:
password: "CHANGE_ME"
luks:
enabled: true
passphrase: "CHANGE_ME"
method: "keyfile"
features:
firewall:
enabled: false
backend: "firewalld"
toolkit: "nftables"
compute01.local:
ansible_host: 192.168.122.22
system:
filesystem: "btrfs"
type: "virtual"
os: "fedora"
version: "41"
name: "compute01.local"
cpus: 8
memory: 8192
network:
bridge: "default"
ip: 192.168.122.22
prefix: 24
gateway: 192.168.122.1
dns:
servers:
- "1.1.1.1"
- "1.0.0.1"
disks:
- size: 80
- size: 200
mount:
path: /data
fstype: btrfs
user:
name: "compute"
password: "CHANGE_ME"
keys:
- "ssh-ed25519 AAAA..."
root:
password: "CHANGE_ME"
features:
cis:
enabled: true