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