refactor(vars): simplify normalization and remove effective intermediates
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user