feat(vmware): add hypervisor.node for ESXi host pinning (mutually exclusive with cluster)

This commit is contained in:
2026-03-11 03:51:00 +01:00
committed by MORAWSKI Norbert
parent 13faf33296
commit ad4a019554
3 changed files with 21 additions and 2 deletions

View File

@@ -166,6 +166,23 @@
label: "hypervisor.{{ item }}"
no_log: true
- name: Validate VMware placement (cluster or node required, mutually exclusive)
when:
- system_cfg.type == "virtual"
- hypervisor_type == "vmware"
ansible.builtin.assert:
that:
- >-
(hypervisor_cfg.cluster | default('') | string | length > 0)
or (hypervisor_cfg.node | default('') | string | length > 0)
- >-
(hypervisor_cfg.cluster | default('') | string | length == 0)
or (hypervisor_cfg.node | default('') | string | length == 0)
fail_msg: >-
VMware requires either hypervisor.cluster or hypervisor.node (mutually exclusive).
cluster targets a vSphere cluster; node targets a specific ESXi host.
quiet: true
- name: Validate hypervisor-specific required system fields
when:
- system_cfg.type == "virtual"