mirror of
https://github.com/ansible/ansible.git
synced 2026-08-03 00:22:10 +02:00
Fixes #81954
(cherry picked from commit 77ab7af)
Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
This commit is contained in:
co-authored by
Martin Krizek
parent
5a3bcd4bac
commit
bdf45d1fbc
@@ -0,0 +1,2 @@
|
||||
bugfixes:
|
||||
- "dnf - fix an issue when cached RPMs were left in the cache directory even when the keepcache setting was unset (https://github.com/ansible/ansible/issues/81954)"
|
||||
@@ -1441,8 +1441,10 @@ class DnfModule(YumDnf):
|
||||
|
||||
if self.with_modules:
|
||||
self.module_base = dnf.module.module_base.ModuleBase(self.base)
|
||||
|
||||
self.ensure()
|
||||
try:
|
||||
self.ensure()
|
||||
finally:
|
||||
self.base.close()
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
@@ -67,6 +67,17 @@
|
||||
update_cache: True
|
||||
register: dnf_result
|
||||
|
||||
- find:
|
||||
paths: /var/cache/dnf
|
||||
patterns: "*.rpm"
|
||||
recurse: true
|
||||
register: r
|
||||
|
||||
- name: verify that RPM cache is cleared after installation as keepcache is off by default
|
||||
assert:
|
||||
that:
|
||||
- r.matched == 0
|
||||
|
||||
- name: check sos with rpm
|
||||
shell: rpm -q sos
|
||||
failed_when: False
|
||||
|
||||
Reference in New Issue
Block a user