fix(vmware): inherit vCenter folder from hypervisor_cfg.folder when system.path is empty

This commit is contained in:
2026-03-12 02:41:22 +01:00
committed by MORAWSKI Norbert
parent a6300a5467
commit 7227ca1aa0
2 changed files with 13 additions and 1 deletions

View File

@@ -77,7 +77,12 @@
if (system_raw.mirror | default('') | string | trim | length) > 0 if (system_raw.mirror | default('') | string | trim | length) > 0
else _mirror_defaults[system_raw.os | default('') | string | lower] | default('') else _mirror_defaults[system_raw.os | default('') | string | lower] | default('')
}} }}
path: "{{ system_raw.path | default('') | string }}" path: >-
{{
(system_raw.path | default('') | string)
if (system_raw.path | default('') | string | length > 0)
else (hypervisor_cfg.folder | default('') | string)
}}
packages: >- packages: >-
{{ {{
( (

View File

@@ -38,6 +38,13 @@
- name: Normalize system inputs - name: Normalize system inputs
ansible.builtin.include_tasks: system.yml ansible.builtin.include_tasks: system.yml
- name: Inherit folder from hypervisor when system path is empty
when:
- system_cfg.path | default('') | string | length == 0
- hypervisor_cfg.folder | default('') | string | length > 0
ansible.builtin.set_fact:
system_cfg: "{{ system_cfg | combine({'path': hypervisor_cfg.folder | string}, recursive=True) }}"
- name: Validate variables - name: Validate variables
ansible.builtin.include_tasks: validation.yml ansible.builtin.include_tasks: validation.yml