summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Cormie <jason.cormie@st-andrews.ac.uk>2016-11-08 23:34:11 +0000
committerjctanner <tanner.jc@gmail.com>2016-11-08 18:34:11 -0500
commitcbc3aac2f2e56975c1ef97702742d0198db25433 (patch)
tree7486130c0bcf7401b37d75752cdbb1984a0f43bf
parentc953397fded4d7cf06437a06e3bcab95ae1c3d1b (diff)
downloadansible-modules-core-cbc3aac2f2e56975c1ef97702742d0198db25433.tar.gz
Addition of InstanceUUID to facts (#4424)
The Instance UUID(refered to as PersistenceUUID in the API) is a the ID vcenter uses to idenify VMs. My use case for this is that I configure Zabbix using ansible and its vmware module relies on using these to identify VMs.
-rw-r--r--cloud/vmware/vsphere_guest.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/cloud/vmware/vsphere_guest.py b/cloud/vmware/vsphere_guest.py
index b3d186eb..8d60cec2 100644
--- a/cloud/vmware/vsphere_guest.py
+++ b/cloud/vmware/vsphere_guest.py
@@ -1559,6 +1559,7 @@ def gather_facts(vm):
'hw_guest_full_name': vm.properties.config.guestFullName,
'hw_guest_id': vm.properties.config.guestId,
'hw_product_uuid': vm.properties.config.uuid,
+ 'hw_instance_uuid': vm.properties.config.instanceUuid,
'hw_processor_count': vm.properties.config.hardware.numCPU,
'hw_memtotal_mb': vm.properties.config.hardware.memoryMB,
'hw_interfaces':[],