From 9f6fff313b192fe795a4bf6ae4a000f7cf735cd1 Mon Sep 17 00:00:00 2001 From: Sandwich Date: Wed, 11 Feb 2026 05:37:18 +0100 Subject: [PATCH] fix(config): enable dictionary merge for scoped overrides --- ansible.cfg | 2 ++ inventory_baremetal_example.yml | 3 ++- inventory_example.yml | 4 ++-- inventory_libvirt_example.yml | 6 +++--- vars_baremetal_example.yml | 3 +-- vars_example.yml | 2 +- 6 files changed, 11 insertions(+), 9 deletions(-) create mode 100644 ansible.cfg diff --git a/ansible.cfg b/ansible.cfg new file mode 100644 index 0000000..be1e477 --- /dev/null +++ b/ansible.cfg @@ -0,0 +1,2 @@ +[defaults] +hash_behaviour = merge diff --git a/inventory_baremetal_example.yml b/inventory_baremetal_example.yml index 39d7de4..72ada42 100644 --- a/inventory_baremetal_example.yml +++ b/inventory_baremetal_example.yml @@ -3,7 +3,8 @@ all: vars: hypervisor: type: "none" - filesystem: "ext4" + system: + filesystem: "ext4" hosts: baremetal01.example.com: ansible_host: 10.0.0.162 diff --git a/inventory_example.yml b/inventory_example.yml index f3a3ee1..cf6eb40 100644 --- a/inventory_example.yml +++ b/inventory_example.yml @@ -14,8 +14,8 @@ all: hosts: app01.example.com: ansible_host: 10.0.0.10 - filesystem: "btrfs" system: + filesystem: "btrfs" type: "virtual" os: "archlinux" name: "app01.example.com" @@ -72,9 +72,9 @@ all: tool: "arch-chroot" db01.example.com: ansible_host: 10.0.0.11 - filesystem: "xfs" rhel_iso: "local:iso/rhel-9.4-x86_64-dvd.iso" system: + filesystem: "xfs" type: "virtual" os: "rhel" version: "9" diff --git a/inventory_libvirt_example.yml b/inventory_libvirt_example.yml index 88dfcaf..2650716 100644 --- a/inventory_libvirt_example.yml +++ b/inventory_libvirt_example.yml @@ -14,8 +14,8 @@ all: hosts: web01.local: ansible_host: 192.168.122.20 - filesystem: "ext4" system: + filesystem: "ext4" type: "virtual" os: "debian" version: "12" @@ -54,9 +54,9 @@ all: 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: + filesystem: "xfs" type: "virtual" os: "rhel" version: "9" @@ -95,8 +95,8 @@ all: toolkit: "nftables" compute01.local: ansible_host: 192.168.122.22 - filesystem: "btrfs" system: + filesystem: "btrfs" type: "virtual" os: "fedora" version: "41" diff --git a/vars_baremetal_example.yml b/vars_baremetal_example.yml index 4d32752..20abb8c 100644 --- a/vars_baremetal_example.yml +++ b/vars_baremetal_example.yml @@ -3,11 +3,10 @@ hypervisor: type: "none" -filesystem: "btrfs" - system: type: "physical" os: "archlinux" + filesystem: "btrfs" # btrfs|ext4|xfs name: "{{ inventory_hostname }}" cpus: 8 memory: 16384 diff --git a/vars_example.yml b/vars_example.yml index 3582683..fe67900 100644 --- a/vars_example.yml +++ b/vars_example.yml @@ -1,6 +1,5 @@ --- # Example variables for virtual provisioning. -filesystem: "btrfs" custom_iso: false hypervisor: @@ -19,6 +18,7 @@ system: type: "virtual" # virtual|physical os: "archlinux" version: "" + filesystem: "btrfs" # btrfs|ext4|xfs name: "{{ inventory_hostname }}" id: 100 cpus: 4