mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-03-22 05:09:12 +00:00
[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>
This commit is contained in:
parent
9c3e14701b
commit
cfee3284cd
2 changed files with 6 additions and 1 deletions
|
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- zypper_repository - use ``metalink`` attribute to identify repositories without ``<url/>`` element (https://github.com/ansible-collections/community.general/issues/10224, https://github.com/ansible-collections/community.general/pull/10225).
|
||||
Loading…
Add table
Add a link
Reference in a new issue