refactor(vars): simplify normalization and remove effective intermediates

This commit is contained in:
2026-02-11 05:37:18 +01:00
parent 04727033f1
commit b8c672507f
9 changed files with 267 additions and 409 deletions

View File

@@ -15,12 +15,8 @@
- name: Normalize hypervisor configuration
vars:
hypervisor_cfg_effective: >-
{{
hypervisor_defaults
| combine(hypervisor, recursive=True)
}}
hypervisor_cfg_normalized: "{{ hypervisor_defaults | combine(hypervisor, recursive=True) }}"
ansible.builtin.set_fact:
hypervisor_cfg: "{{ hypervisor_cfg_effective }}"
hypervisor_type: "{{ hypervisor_cfg_effective.type | string | lower }}"
hypervisor_cfg: "{{ hypervisor_cfg_normalized }}"
hypervisor_type: "{{ hypervisor_cfg_normalized.type | string | lower }}"
changed_when: false