mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Fix for the case where plugins aren't loaded on old RHEL systems
This commit is contained in:
committed by
Matt Clay
parent
77457feda6
commit
1102afed43
@@ -972,10 +972,15 @@ def main():
|
||||
# loaded and plugins are discovered
|
||||
my.conf
|
||||
repoquery = None
|
||||
if 'rhnplugin' in my.plugins._plugins:
|
||||
repoquerybin = ensure_yum_utils(module)
|
||||
if repoquerybin:
|
||||
repoquery = [repoquerybin, '--show-duplicates', '--plugins', '--quiet']
|
||||
try:
|
||||
yum_plugins = my.plugins._plugins
|
||||
except AttributeError:
|
||||
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']]
|
||||
exclude = params['exclude']
|
||||
|
||||
Reference in New Issue
Block a user