mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
fix attribute test
This commit is contained in:
parent
edcb27b052
commit
b6b512fda9
1 changed files with 3 additions and 2 deletions
|
@ -200,8 +200,9 @@ class InventoryModule(BaseInventoryPlugin, Constructable):
|
||||||
|
|
||||||
server['name'] = vm.NAME
|
server['name'] = vm.NAME
|
||||||
server['id'] = vm.ID
|
server['id'] = vm.ID
|
||||||
if vm.HISTORY_RECORDS.HISTORY:
|
if 'HISTORY' in vm.HISTORY_RECORDS:
|
||||||
server['host'] = vm.HISTORY_RECORDS.HISTORY[-1].HOSTNAME
|
if vm.HISTORY_RECORDS['HISTORY']:
|
||||||
|
server['host'] = vm.HISTORY_RECORDS.HISTORY[-1].HOSTNAME
|
||||||
server['LABELS'] = labels
|
server['LABELS'] = labels
|
||||||
server['v4_first_ip'] = self._get_vm_ipv4(vm)
|
server['v4_first_ip'] = self._get_vm_ipv4(vm)
|
||||||
server['v6_first_ip'] = self._get_vm_ipv6(vm)
|
server['v6_first_ip'] = self._get_vm_ipv6(vm)
|
||||||
|
|
Loading…
Reference in a new issue