1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-02-04 16:01:55 +00:00
community.general/plugins
patchback[bot] cfee3284cd
[PR #10225/0aeb1b7b backport][stable-10] zypper_repository: handle repositories without <url/> element (#10251)
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



---------


(cherry picked from commit 0aeb1b7bb2)

Co-authored-by: Martin Wilck <mwilck@suse.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-06-15 13:17:58 +02:00
..
action [PR #9583/81e22180 backport][stable-10] action/become/cache/callback: adjust import __future__ for Python3 (#9586) 2025-01-20 20:15:52 +01:00
become [PR #9583/81e22180 backport][stable-10] action/become/cache/callback: adjust import __future__ for Python3 (#9586) 2025-01-20 20:15:52 +01:00
cache [PR #10136/937d92ee backport][stable-10] pickle cache plugin, avoid extra steps in DT (#10144) 2025-05-16 22:37:55 +02:00
callback [PR #10242/66cb9aef backport][stable-10] yaml callback: use new util introduced in ansible-core 2.19.0b2 (#10245) 2025-06-15 11:12:08 +02:00
connection [PR #9795/96b49300 backport][stable-10] add the wsl connection plugin (#10019) 2025-04-19 09:34:11 +02:00
doc_fragments [PR #9964/1375cb65 backport][stable-10] Unify TLS/SSL config for Redfish modules with new common argument spec and docs fragment; add validate_certs and ca_path options (#9982) 2025-04-10 07:26:48 +02:00
filter [PR #9954/7e4d6aa5 backport][stable-10] Add new filter plugin: 'to_prettytable' (#10094) 2025-05-02 10:34:06 +02:00
inventory [PR #10027/299172d2 backport][stable-10] fixed hidden warnings from extra tests - batch 2 (#10101) 2025-05-04 21:40:28 +02:00
lookup [PR #10027/299172d2 backport][stable-10] fixed hidden warnings from extra tests - batch 2 (#10101) 2025-05-04 21:40:28 +02:00
module_utils [PR #10031/2b4cb6da backport][stable-10] pipx: accept python version specs in parameter name (#10149) 2025-05-17 08:24:12 +02:00
modules [PR #10225/0aeb1b7b backport][stable-10] zypper_repository: handle repositories without <url/> element (#10251) 2025-06-15 13:17:58 +02:00
plugin_utils [PR #9833/04cfce78 backport][stable-10] Make ready for data tagging (#9990) 2025-04-14 21:23:00 +02:00
test [PR #9833/04cfce78 backport][stable-10] Make ready for data tagging (#9990) 2025-04-14 21:23:00 +02:00