refactor(global_defaults): data-driven hypervisor validation and shared constants

This commit is contained in:
2026-02-22 01:59:09 +01:00
parent 1216c79619
commit 2bf0cb901e
5 changed files with 74 additions and 63 deletions

View File

@@ -2,10 +2,10 @@
- name: Normalize system disks input
vars:
system_disks: "{{ system_cfg.disks | default([]) }}"
system_disk_letter_map: "abcdefghijklmnopqrstuvwxyz"
system_disk_letter_map: "{{ disk_letter_map }}"
system_disk_device_prefix: >-
{{
{'libvirt': '/dev/vd', 'xen': '/dev/xvd', 'proxmox': '/dev/sd', 'vmware': '/dev/sd'}.get(hypervisor_type, '')
hypervisor_disk_device_map.get(hypervisor_type, '')
if system_cfg.type == 'virtual'
else ''
}}