This commit is contained in:
3
changelogs/fragments/80887-dnf5-api-change.yml
Normal file
3
changelogs/fragments/80887-dnf5-api-change.yml
Normal file
@ -0,0 +1,3 @@
|
||||
bugfixes:
|
||||
- dnf5 - Update dnf5 module to handle API change for setting the download directory
|
||||
(https://github.com/ansible/ansible/issues/80887)
|
||||
@ -513,6 +513,8 @@ class Dnf5Module(YumDnf):
|
||||
conf.installroot = self.installroot
|
||||
conf.use_host_config = True # needed for installroot
|
||||
conf.cacheonly = self.cacheonly
|
||||
if self.download_dir:
|
||||
conf.destdir = self.download_dir
|
||||
|
||||
base.setup()
|
||||
|
||||
@ -667,7 +669,7 @@ class Dnf5Module(YumDnf):
|
||||
if results:
|
||||
msg = "Check mode: No changes made, but would have if not in check mode"
|
||||
else:
|
||||
transaction.download(self.download_dir or "")
|
||||
transaction.download()
|
||||
if not self.download_only:
|
||||
if not self.disable_gpg_check and not transaction.check_gpg_signatures():
|
||||
self.module.fail_json(
|
||||
|
||||
Reference in New Issue
Block a user