1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/plugins
patchback[bot] 5eff31e760
[PR #8489/3716187f backport][stable-9] Fix OpenNebula inventory crash when NIC does not have IP (#8519)
Fix OpenNebula inventory crash when NIC does not have IP (#8489)

* Fix OpenNebula inventory crash when NIC does not have IP

Match IPv6 behaviour.

When a NIC does not have an IP:
  File "ansible/inventory/manager.py", line 292, in parse_source
    plugin.parse(self._inventory, self._loader, source, cache=cache)
  File "ansible-cm/plugins/inventory/opennebula.py", line 263, in parse
    self._populate()
  File "ansible-cm/plugins/inventory/opennebula.py", line 226, in _populate
    servers = self._retrieve_servers(filter_by_label)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "ansible-cm/plugins/inventory/opennebula.py", line 210, in _retrieve_servers
    server['v4_first_ip'] = self._get_vm_ipv4(vm)
                            ^^^^^^^^^^^^^^^^^^^^^
  File "ansible-cm/plugins/inventory/opennebula.py", line 154, in _get_vm_ipv4
    return net['IP']

* Update to call to match IPv6 and add changelog fragment

* Update changelog fragment.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 3716187fc3)

Co-authored-by: Tom Paine <github@aioue.net>
2024-06-16 22:24:35 +02:00
..
action Fix more typos (#7439) 2023-10-29 18:04:44 +01:00
become lint and fix polkit examples (#8381) 2024-05-19 20:50:41 +02:00
cache Fix more typos (#7439) 2023-10-29 18:04:44 +01:00
callback [PR #8430/5041ebe5 backport][stable-9] fix(opentelemetry): remove request from the logs (#8458) 2024-06-03 07:15:49 +02:00
connection Refer to LXD containers/VMs as instances (#7873) 2024-01-24 13:35:17 +01:00
doc_fragments [PR #8441/d2d7deb4 backport][stable-9] #8440 Allow for API Port to be specified when using proxmox_kvm (#8478) 2024-06-08 14:59:27 +02:00
filter [PR #8446/1d615419 backport][stable-9] Feature filter replace_keys (#8507) 2024-06-15 12:00:09 +02:00
inventory [PR #8489/3716187f backport][stable-9] Fix OpenNebula inventory crash when NIC does not have IP (#8519) 2024-06-16 22:24:35 +02:00
lookup bug(lookup/merge_variables): Fix rendering foreign variables (#8303) 2024-05-11 16:51:51 +02:00
module_utils [PR #8512/ec4cf555 backport][stable-9] simplify cmd_runner_fmt.as_bool_not() (#8515) 2024-06-16 10:10:55 +02:00
modules [PR #7989/03966624 backport][stable-9] Consul implement agent service and check (#8513) 2024-06-16 10:10:45 +02:00
plugin_utils [PR #8446/1d615419 backport][stable-9] Feature filter replace_keys (#8507) 2024-06-15 12:00:09 +02:00
test Add test fqdn_valid (#7533) 2023-11-22 09:12:00 +01:00