dnf: add more specific error message for GPG check (#76194)

Fixes #76192
pull/76201/head
Martin Krizek 4 years ago committed by GitHub
parent fdc3348859
commit 150faf25d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,2 @@
minor_changes:
- dnf - add more specific error message for GPG validation (https://github.com/ansible/ansible/issues/76192)

@ -1298,7 +1298,7 @@ class DnfModule(YumDnf):
fail = True fail = True
if fail: if fail:
msg = 'Failed to validate GPG signature for {0}'.format(package) msg = 'Failed to validate GPG signature for {0}: {1}'.format(package, gpgerr)
self.module.fail_json(msg) self.module.fail_json(msg)
if self.download_only: if self.download_only:

@ -57,6 +57,7 @@
that: that:
- res is failed - res is failed
- "'Failed to validate GPG signature' in res.msg" - "'Failed to validate GPG signature' in res.msg"
- "'is not signed' in res.msg"
always: always:
- name: Remove rpm-sign (and test package if it got installed) - name: Remove rpm-sign (and test package if it got installed)

Loading…
Cancel
Save