Added the 'hw_interfaces' array, listing the names of all interfaces present on the VM as 'ansible_interfaces' lists the ones seen by the operating system

pull/18777/head
Guto Andreollo 9 years ago committed by Matt Clay
parent bd531f87bc
commit 81a1579e20

@ -1165,6 +1165,7 @@ def gather_facts(vm):
'hw_product_uuid': vm.properties.config.uuid, 'hw_product_uuid': vm.properties.config.uuid,
'hw_processor_count': vm.properties.config.hardware.numCPU, 'hw_processor_count': vm.properties.config.hardware.numCPU,
'hw_memtotal_mb': vm.properties.config.hardware.memoryMB, 'hw_memtotal_mb': vm.properties.config.hardware.memoryMB,
'hw_interfaces':[],
} }
netInfo = vm.get_property('net') netInfo = vm.get_property('net')
netDict = {} netDict = {}
@ -1187,6 +1188,7 @@ def gather_facts(vm):
'macaddress_dash': entry.macAddress.replace(':', '-'), 'macaddress_dash': entry.macAddress.replace(':', '-'),
'summary': entry.deviceInfo.summary, 'summary': entry.deviceInfo.summary,
} }
facts['hw_interfaces'].append('eth'+str(ifidx))
ifidx += 1 ifidx += 1

Loading…
Cancel
Save