From 079705f8daa9fff4df76d9f5a52cb761541f72e6 Mon Sep 17 00:00:00 2001 From: Adam Miller Date: Tue, 23 Oct 2018 11:41:27 -0500 Subject: [PATCH] dnf properly gpg check local packages based on param (#47455) * dnf properly gpg check local packages based on param Fixes #43624 Signed-off-by: Adam Miller --- changelogs/fragments/dnf-localgpgcheck.yaml | 3 +++ lib/ansible/modules/packaging/os/dnf.py | 1 + 2 files changed, 4 insertions(+) create mode 100644 changelogs/fragments/dnf-localgpgcheck.yaml diff --git a/changelogs/fragments/dnf-localgpgcheck.yaml b/changelogs/fragments/dnf-localgpgcheck.yaml new file mode 100644 index 0000000000..7ccb4b609c --- /dev/null +++ b/changelogs/fragments/dnf-localgpgcheck.yaml @@ -0,0 +1,3 @@ +--- +minor_changes: + - "dnf properly honor disable_gpg_check for local (on local disk of remote node) package installation" diff --git a/lib/ansible/modules/packaging/os/dnf.py b/lib/ansible/modules/packaging/os/dnf.py index 1cfa90d7ce..b286f2b666 100644 --- a/lib/ansible/modules/packaging/os/dnf.py +++ b/lib/ansible/modules/packaging/os/dnf.py @@ -489,6 +489,7 @@ class DnfModule(YumDnf): # Set whether to check gpg signatures conf.gpgcheck = not disable_gpg_check + conf.localpkg_gpgcheck = not disable_gpg_check # Don't prompt for user confirmations conf.assumeyes = True