From 9baca6ef3d3d13c03b2cb043540cda96820a282a Mon Sep 17 00:00:00 2001 From: Jason Cormie Date: Tue, 8 Nov 2016 23:34:11 +0000 Subject: [PATCH] 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. --- lib/ansible/modules/cloud/vmware/vsphere_guest.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ansible/modules/cloud/vmware/vsphere_guest.py b/lib/ansible/modules/cloud/vmware/vsphere_guest.py index 145993b9ea..ffa6baa1fd 100644 --- a/lib/ansible/modules/cloud/vmware/vsphere_guest.py +++ b/lib/ansible/modules/cloud/vmware/vsphere_guest.py @@ -1556,6 +1556,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':[],