mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 05:12:45 +00:00
make yum module work with older yum for rhel5 :(
This commit is contained in:
committed by
Michael DeHaan
parent
85a0709d8f
commit
a27be2651c
@@ -41,7 +41,12 @@ def yum_base(conf_file=None, cachedir=False):
|
||||
if conf_file and os.path.exists(conf_file):
|
||||
my.preconf.fn = conf_file
|
||||
if cachedir:
|
||||
my.setCacheDir()
|
||||
if hasattr(my, 'setCacheDir'):
|
||||
my.setCacheDir()
|
||||
else:
|
||||
cachedir = yum.misc.getCacheDir()
|
||||
my.repos.setCacheDir(cachedir)
|
||||
my.conf.cache = 0
|
||||
|
||||
return my
|
||||
|
||||
|
||||
Reference in New Issue
Block a user