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

@@ -32,7 +32,8 @@
{%- endfor -%}
{{ ns.out }}
community.vmware.vmware_guest:
cluster: "{{ hypervisor_cfg.cluster }}"
cluster: "{{ hypervisor_cfg.cluster if (hypervisor_cfg.node | default('') | length == 0) else omit }}"
esxi_hostname: "{{ hypervisor_cfg.node if (hypervisor_cfg.node | default('') | length > 0) else omit }}"
folder: "{{ system_cfg.path if system_cfg.path | string | length > 0 else omit }}"
name: "{{ hostname }}"
# Generic guest ID — VMware auto-detects OS post-install