refactor(schema): simplify dict normalization and schema checks

This commit is contained in:
2026-02-11 05:37:18 +01:00
parent aac2bd0b06
commit 5326907ae9
4 changed files with 207 additions and 269 deletions

View File

@@ -14,9 +14,7 @@
quiet: true
- name: Normalize hypervisor configuration
vars:
hypervisor_cfg_normalized: "{{ hypervisor_defaults | combine(hypervisor, recursive=True) }}"
ansible.builtin.set_fact:
hypervisor_cfg: "{{ hypervisor_cfg_normalized }}"
hypervisor_type: "{{ hypervisor_cfg_normalized.type | string | lower }}"
hypervisor_cfg: "{{ hypervisor_defaults | combine(hypervisor, recursive=True) }}"
hypervisor_type: "{{ (hypervisor_defaults | combine(hypervisor, recursive=True)).type | string | lower }}"
changed_when: false