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

Fixes #80110
This commit is contained in:
Martin Krizek
2023-11-06 10:22:35 +01:00
committed by GitHub
parent 51d691bfa9
commit 5ac62473b0
2 changed files with 7 additions and 0 deletions
@@ -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)
+5
View File
@@ -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()