[PR #10689/cc41d9da backport][stable-11] gem: fix soundness issue when uninstalling default gems on Ubuntu (#10878)

gem: fix soundness issue when uninstalling default gems on Ubuntu (#10689)

* Attempt to fix gem soundness issue

* Return command execution

* Fix value error

* Attempt to fix failling tests

* Fix minor issues

* Update changelog

* Update tests/integration/targets/gem/tasks/main.yml



* Update changelogs/fragments/10689-gem-prevent-soundness-issue.yml



* Remove state and name from gem error message

* Improve gem uninstall check

* Make unit tests pass

* Fix linting issues

* gem: Remove length chenck and adapt unit tests

* Adapt gem unit tests

* gem: improve error msg

* Fix sanity error

* Fix linting issue

---------


(cherry picked from commit cc41d9da60)

Co-authored-by: Giorgos Drosos <56369797+gdrosos@users.noreply.github.com>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
patchback[bot]
2025-10-05 07:23:48 +02:00
committed by GitHub
parent 5af8d6132d
commit 90850b3763
4 changed files with 38 additions and 8 deletions

View File

@@ -0,0 +1,2 @@
bugfixes:
- "gem - fix soundness issue when uninstalling default gems on Ubuntu (https://github.com/ansible-collections/community.general/issues/10451, https://github.com/ansible-collections/community.general/pull/10689)."