From e7146ed2655a4d24bd61300c7c817074f868ad28 Mon Sep 17 00:00:00 2001 From: Cristian Van Ee Date: Wed, 22 Oct 2014 00:55:22 +0200 Subject: [PATCH] Fixed cachedir function --- lib/ansible/modules/extras/packaging/dnf.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/ansible/modules/extras/packaging/dnf.py b/lib/ansible/modules/extras/packaging/dnf.py index 1c0a94a670..2ce8cb6ab2 100644 --- a/lib/ansible/modules/extras/packaging/dnf.py +++ b/lib/ansible/modules/extras/packaging/dnf.py @@ -152,10 +152,10 @@ def dnf_base(conf_file=None, cachedir=False): if cachedir or os.geteuid() != 0: if hasattr(my, 'setCacheDir'): my.setCacheDir() -# else: -# cachedir = dnf.misc.getCacheDir() -# my.repos.setCacheDir(cachedir) -# my.conf.cache = 0 + else: + cachedir = cachedir.dnf.Conf() + my.repos.setCacheDir(cachedir) + my.conf.cache = 0 return my