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/inventory
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
..
cobbler.py [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
gitlab_runners.py [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
icinga2.py [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
linode.py [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
lxd.py [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
nmap.py [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
online.py [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
opennebula.py [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
proxmox.py [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
scaleway.py [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
stackpath_compute.py [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
virtualbox.py [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
xen_orchestra.py [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