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] b901fa7463
[PR #8489/3716187f backport][stable-8] Fix OpenNebula inventory crash when NIC does not have IP (#8518)
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:30 +02:00
..
action Fix more typos (#7439) 2023-10-29 18:04:44 +01:00
become machinectl become plugin: mark as require_tty (#6935) 2023-07-15 12:53:59 +02:00
cache Fix more typos (#7439) 2023-10-29 18:04:44 +01:00
callback [stable-8] fix(opentelemetry): remove request from the logs (#8430) (#8461) 2024-06-04 06:28:38 +02:00
connection [PR #7873/13e3161f backport][stable-8] Refer to LXD containers/VMs as instances (#7891) 2024-01-24 19:49:01 +01:00
doc_fragments [PR #7897/afd19888 backport][stable-8] Consul action group (#7905) 2024-01-27 12:21:34 +01:00
filter [PR #8475/8f60f3ae backport][stable-8] Update docs lists_mergeby (#8494) 2024-06-13 07:47:59 +02:00
inventory [PR #8489/3716187f backport][stable-8] Fix OpenNebula inventory crash when NIC does not have IP (#8518) 2024-06-16 22:24:30 +02:00
lookup [PR #8303/136419c5 backport][stable-8] bug(lookup/merge_variables): Fix rendering foreign variables (#8338) 2024-05-11 17:11:18 +02:00
module_utils [PR #8252/a5697da2 backport][stable-8] Keycloak client role scope (#8266) 2024-04-21 20:39:47 +02:00
modules [PR #8497/f0940d82 backport][stable-8] homectl, udm_user: guard crypt imports (#8498) 2024-06-13 22:01:30 +02:00
plugin_utils [PR #8225/7fd37ea2 backport][stable-8] inventory plugins: make wrapping variables as unsafe smarter to avoid triggering an AWX bug (#8246) 2024-04-20 10:20:32 +02:00
test [PR #7533/2a5e7c33 backport][stable-8] Add test fqdn_valid (#7567) 2023-11-22 09:26:17 +01:00