1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-05-05 09:45:13 +00:00

[PR #11949/dd5bd733 backport][stable-12] apt_rpm: handle update-kernel rc=1 when no new kernel is available (#11973)

apt_rpm: handle `update-kernel` rc=1 when no new kernel is available (#11949)

* fix(apt_rpm): do not fail when update-kernel finds no new kernel

update-kernel exits with rc=1 when the kernel is already at the latest
version. Handle this case gracefully by checking for the known
"There are no available kernels" message in stderr and returning
changed=False instead of raising an error.

Fixes #10055

* fix(apt_rpm): add changelog fragment for #11949

* Apply suggestion from review



---------


(cherry picked from commit dd5bd733fc)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
patchback[bot] 2026-05-02 10:20:50 +02:00 committed by GitHub
parent 6e379091a4
commit 064dc97956
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 1 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- "apt_rpm - do not fail when ``update_kernel`` finds no new kernel available (https://github.com/ansible-collections/community.general/issues/10055, https://github.com/ansible-collections/community.general/pull/11949)."