dnf: properly set gpg options on repos (#80777)

Fixes #80110
pull/82145/head
Martin Krizek 11 months ago committed by GitHub
parent 51d691bfa9
commit 5ac62473b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,2 @@
bugfixes:
- dnf - properly set gpg check options on enabled repositories according to the ``disable_gpg_check`` option (https://github.com/ansible/ansible/issues/80110)

@ -723,6 +723,11 @@ class DnfModule(YumDnf):
for repo in repos.get_matching(repo_pattern):
repo.enable()
for repo in base.repos.iter_enabled():
if self.disable_gpg_check:
repo.gpgcheck = False
repo.repo_gpgcheck = False
def _base(self, conf_file, disable_gpg_check, disablerepo, enablerepo, installroot, sslverify):
"""Return a fully configured dnf Base object."""
base = dnf.Base()

Loading…
Cancel
Save