community.general/plugins
Martin Wilck 0aeb1b7bb2
Some checks failed
EOL CI / EOL Sanity (Ⓐ2.16) (push) Has been cancelled
EOL CI / EOL Units (Ⓐ2.16+py2.7) (push) Has been cancelled
EOL CI / EOL Units (Ⓐ2.16+py3.11) (push) Has been cancelled
EOL CI / EOL Units (Ⓐ2.16+py3.6) (push) Has been cancelled
EOL CI / EOL I (Ⓐ2.16+alpine3+py:azp/posix/1/) (push) Has been cancelled
EOL CI / EOL I (Ⓐ2.16+alpine3+py:azp/posix/2/) (push) Has been cancelled
EOL CI / EOL I (Ⓐ2.16+alpine3+py:azp/posix/3/) (push) Has been cancelled
EOL CI / EOL I (Ⓐ2.16+fedora38+py:azp/posix/1/) (push) Has been cancelled
EOL CI / EOL I (Ⓐ2.16+fedora38+py:azp/posix/2/) (push) Has been cancelled
EOL CI / EOL I (Ⓐ2.16+fedora38+py:azp/posix/3/) (push) Has been cancelled
EOL CI / EOL I (Ⓐ2.16+opensuse15+py:azp/posix/1/) (push) Has been cancelled
EOL CI / EOL I (Ⓐ2.16+opensuse15+py:azp/posix/2/) (push) Has been cancelled
EOL CI / EOL I (Ⓐ2.16+opensuse15+py:azp/posix/3/) (push) Has been cancelled
nox / Run extra sanity tests (push) Has been cancelled
zypper_repository: handle repositories without <url/> element (#10225)
* zypper_repository: handle repositories without <url/> element

zypper_repository identifies repos using a combination of "alias"
and "url". Recently, openSUE has begun using "metalink" attributes
instead of "url" elements, causing errors like this:

  File "/tmp/ansible_zypper_repository_payload_euim_nod/ansible_zypper_repository_payload.zip/ansible_collections/community/general/plugins/modules/zypper_repository.py", line 475, in <module>
  File "/tmp/ansible_zypper_repository_payload_euim_nod/ansible_zypper_repository_payload.zip/ansible_collections/community/general/plugins/modules/zypper_repository.py", line 448, in main
  File "/tmp/ansible_zypper_repository_payload_euim_nod/ansible_zypper_repository_payload.zip/ansible_collections/community/general/plugins/modules/zypper_repository.py", line 223, in repo_exists
  File "/tmp/ansible_zypper_repository_payload_euim_nod/ansible_zypper_repository_payload.zip/ansible_collections/community/general/plugins/modules/zypper_repository.py", line 177, in _parse_repos
IndexError: list index out of range

Fix this by using the "metalink" attribute instead of the value
of the "url" element if the latter is missing.

* Update changelogs/fragments/10224-zypper_repository-metalink.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-06-15 13:02:10 +02:00
..
action action/become/cache/callback: adjust import __future__ for Python3 (#9583) 2025-01-20 19:36:21 +01:00
become action/become/cache/callback: adjust import __future__ for Python3 (#9583) 2025-01-20 19:36:21 +01:00
cache pickle cache plugin, avoid extra steps in DT (#10136) 2025-05-16 06:59:47 +02:00
callback yaml callback: use new util introduced in ansible-core 2.19.0b2 (#10242) 2025-06-15 10:15:46 +02:00
connection Remove proxmox content (#10110) 2025-06-08 16:18:16 +02:00
doc_fragments Remove proxmox content (#10110) 2025-06-08 16:18:16 +02:00
filter Add new filter plugin: 'to_prettytable' (#9954) 2025-05-02 06:16:45 +02:00
inventory Inventory iocage - get inventory alias from iocage tags. (#10207) 2025-06-12 22:12:51 +02:00
lookup Add changes by russoz (#10192) 2025-06-02 20:10:42 +02:00
module_utils Remove proxmox content (#10110) 2025-06-08 16:18:16 +02:00
modules zypper_repository: handle repositories without <url/> element (#10225) 2025-06-15 13:02:10 +02:00
plugin_utils Make ready for data tagging (#9833) 2025-04-14 19:04:26 +02:00
test Make ready for data tagging (#9833) 2025-04-14 19:04:26 +02:00