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
This commit is contained in:
parent
ca80b92233
commit
b00fe3e22b
1 changed files with 2 additions and 0 deletions
|
@ -1092,6 +1092,7 @@ def gather_facts(vm):
|
|||
'hw_product_uuid': vm.properties.config.uuid,
|
||||
'hw_processor_count': vm.properties.config.hardware.numCPU,
|
||||
'hw_memtotal_mb': vm.properties.config.hardware.memoryMB,
|
||||
'hw_interfaces':[],
|
||||
}
|
||||
netInfo = vm.get_property('net')
|
||||
netDict = {}
|
||||
|
@ -1114,6 +1115,7 @@ def gather_facts(vm):
|
|||
'macaddress_dash': entry.macAddress.replace(':', '-'),
|
||||
'summary': entry.deviceInfo.summary,
|
||||
}
|
||||
facts['hw_interfaces'].append('eth'+str(ifidx))
|
||||
|
||||
ifidx += 1
|
||||
|
||||
|
|
Loading…
Reference in a new issue