mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-03 14:59:09 -07:00
make yum module work with older yum for rhel5 :(
This commit is contained in:
parent
3f9f8de031
commit
f9043bf156
1 changed files with 6 additions and 1 deletions
|
@ -41,7 +41,12 @@ def yum_base(conf_file=None, cachedir=False):
|
||||||
if conf_file and os.path.exists(conf_file):
|
if conf_file and os.path.exists(conf_file):
|
||||||
my.preconf.fn = conf_file
|
my.preconf.fn = conf_file
|
||||||
if cachedir:
|
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
|
return my
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue