mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fix for the case where plugins aren't loaded on old RHEL systems
This commit is contained in:
parent
77457feda6
commit
1102afed43
1 changed files with 9 additions and 4 deletions
|
@ -972,10 +972,15 @@ def main():
|
||||||
# loaded and plugins are discovered
|
# loaded and plugins are discovered
|
||||||
my.conf
|
my.conf
|
||||||
repoquery = None
|
repoquery = None
|
||||||
if 'rhnplugin' in my.plugins._plugins:
|
try:
|
||||||
repoquerybin = ensure_yum_utils(module)
|
yum_plugins = my.plugins._plugins
|
||||||
if repoquerybin:
|
except AttributeError:
|
||||||
repoquery = [repoquerybin, '--show-duplicates', '--plugins', '--quiet']
|
pass
|
||||||
|
else:
|
||||||
|
if 'rhnplugin' in yum_plugins:
|
||||||
|
repoquerybin = ensure_yum_utils(module)
|
||||||
|
if repoquerybin:
|
||||||
|
repoquery = [repoquerybin, '--show-duplicates', '--plugins', '--quiet']
|
||||||
|
|
||||||
pkg = [ p.strip() for p in params['name']]
|
pkg = [ p.strip() for p in params['name']]
|
||||||
exclude = params['exclude']
|
exclude = params['exclude']
|
||||||
|
|
Loading…
Reference in a new issue