refactor(validation): deduplicate hypervisor combine and collapse schema checks

This commit is contained in:
2026-02-11 07:43:19 +01:00
parent 70475f4082
commit fc8f43a25a
2 changed files with 17 additions and 53 deletions

View File

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