Commit graph

9 commits

Author SHA1 Message Date
patchback[bot]
cfee3284cd
[PR #10225/0aeb1b7b backport][stable-10] zypper_repository: handle repositories without <url/> element (#10251)
Some checks failed
EOL CI / EOL Sanity (Ⓐ2.15) (push) Has been cancelled
EOL CI / EOL Units (Ⓐ2.15+py2.7) (push) Has been cancelled
EOL CI / EOL Units (Ⓐ2.15+py3.10) (push) Has been cancelled
EOL CI / EOL Units (Ⓐ2.15+py3.5) (push) Has been cancelled
EOL CI / EOL I (Ⓐ2.15+alpine3+py:azp/posix/1/) (push) Has been cancelled
EOL CI / EOL I (Ⓐ2.15+alpine3+py:azp/posix/2/) (push) Has been cancelled
EOL CI / EOL I (Ⓐ2.15+alpine3+py:azp/posix/3/) (push) Has been cancelled
EOL CI / EOL I (Ⓐ2.15+fedora37+py:azp/posix/1/) (push) Has been cancelled
EOL CI / EOL I (Ⓐ2.15+fedora37+py:azp/posix/2/) (push) Has been cancelled
EOL CI / EOL I (Ⓐ2.15+fedora37+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



---------


(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
patchback[bot]
e8ff74f077
[PR #10223/bc99432f backport][stable-10] zypper_repository: fix usage of removed method ConfigParser.readfp() (#10236)
Some checks failed
EOL CI / EOL Sanity (Ⓐ2.15) (push) Has been cancelled
EOL CI / EOL Units (Ⓐ2.15+py2.7) (push) Has been cancelled
EOL CI / EOL Units (Ⓐ2.15+py3.10) (push) Has been cancelled
EOL CI / EOL Units (Ⓐ2.15+py3.5) (push) Has been cancelled
EOL CI / EOL I (Ⓐ2.15+alpine3+py:azp/posix/1/) (push) Has been cancelled
EOL CI / EOL I (Ⓐ2.15+alpine3+py:azp/posix/2/) (push) Has been cancelled
EOL CI / EOL I (Ⓐ2.15+alpine3+py:azp/posix/3/) (push) Has been cancelled
EOL CI / EOL I (Ⓐ2.15+fedora37+py:azp/posix/1/) (push) Has been cancelled
EOL CI / EOL I (Ⓐ2.15+fedora37+py:azp/posix/2/) (push) Has been cancelled
EOL CI / EOL I (Ⓐ2.15+fedora37+py:azp/posix/3/) (push) Has been cancelled
nox / Run extra sanity tests (push) Has been cancelled
zypper_repository: fix usage of removed method ConfigParser.readfp() (#10223)

* zypper_repository: fix usage of removed method ConfigParser.readfp()

ConfigParser.readfp() has been removed in python 3.12.
See similar fix e.g. in https://github.com/ansible/ansible/pull/81657

This fixes the error message:
AttributeError: 'ConfigParser' object has no attribute 'readfp'. Did you mean: 'read'?

* Update changelogs/fragments/10222-zypper_repository-readfp.yml



---------


(cherry picked from commit bc99432f89)

Co-authored-by: Martin Wilck <mwilck@suse.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-06-12 22:23:03 +02:00
patchback[bot]
e2604e7533
[PR #9513/7c54c703 backport][stable-10] xyz*: style adjustments (#9525)
xyz*: style adjustments (#9513)

(cherry picked from commit 7c54c70301)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-01-04 11:04:02 +01:00
patchback[bot]
97ea891377
[PR #9307/e809a254 backport][stable-10] zypper: adjust docs (#9327)
zypper: adjust docs (#9307)

* adjust docs

* Update plugins/modules/zypper.py

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

* Update plugins/modules/zypper.py

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

* Update plugins/modules/zypper_repository.py

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit e809a25486)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2024-12-23 12:26:00 +01:00
Felix Fontein
ccdcf70d69
Use semantic markup (modules t-z) (#6698)
* Use semantic markup.

* Fix escaping.
2023-06-18 19:48:01 +02:00
Felix Fontein
3ec2fde2c6
Add attributes to package manager modules (#5954)
Add attributes to package manager modules.
2023-02-24 09:25:20 +01:00
Felix Fontein
b531ecdc9b
Unflatmap community.general (#5461)
* Move files.

* Update imports and references.

* Move wrongly placed files.

* Reverse redirects, deprecate long → short name redirects.

* Simplify contribution guidelines for new modules.

* Rewrite BOTMETA.

* Add changelog fragment.

* Fix ignore.txt files.
2022-11-02 20:42:29 +00:00
Felix Fontein
7743ecd776
Replace symlinks with meta/runtime.yml redirects. (#4562) 2022-04-26 20:33:13 +02:00
Brian Coca
8f90360d49
make collection usable with current ansible vers (#9) 2020-03-11 14:10:38 +00:00