vmware host system fact add uuid (#65415)

* vmware host system fact add uuid
This commit is contained in:
Gawain 2019-12-06 01:00:41 +08:00 committed by Gonéri Le Bouder
parent 631120e749
commit e1be5a8acb
2 changed files with 5 additions and 0 deletions

View file

@ -25,6 +25,7 @@ description:
- If hostname or IP address of vCenter is provided as C(hostname) and C(esxi_hostname) is not specified, then the
module will throw an error.
- VSAN facts added in 2.7 version.
- SYSTEM fact uuid added in 2.10 version.
version_added: 2.5
author:
- Wei Gao (@woshihaoren)
@ -165,6 +166,7 @@ ansible_facts:
"ansible_product_serial": "NA",
"ansible_system_vendor": "Red Hat",
"ansible_uptime": 1791680,
"ansible_uuid": "4c4c4544-0052-3410-804c-b2c04f4e3632",
"ansible_vmk0": {
"device": "vmk0",
"ipv4": {
@ -322,6 +324,7 @@ class VMwareHostFactManager(PyVmomi):
'ansible_bios_version': self.host.hardware.biosInfo.biosVersion,
'ansible_uptime': self.host.summary.quickStats.uptime,
'ansible_in_maintenance_mode': self.host.runtime.inMaintenanceMode,
'ansible_uuid': self.host.hardware.systemInfo.uuid,
}
return facts

View file

@ -20,6 +20,7 @@
- "'ansible_processor' in facts['ansible_facts']"
- "'ansible_in_maintenance_mode' in facts['ansible_facts']"
- "'ansible_uptime' in facts['ansible_facts']"
- "'ansible_uuid' in facts['ansible_facts']"
- name: get host facts through from a host
vmware_host_facts:
@ -36,6 +37,7 @@
- "'ansible_processor' in facts['ansible_facts']"
- "'ansible_in_maintenance_mode' in facts['ansible_facts']"
- "'ansible_uptime' in facts['ansible_facts']"
- "'ansible_uuid' in facts['ansible_facts']"
- name: get host properties facts through a vcenter
vmware_host_facts: