mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 04:40:22 -07:00
yum: fix reporting group changes in check_mode (#28331)
This commit is contained in:
parent
84005498bc
commit
711ae03845
2 changed files with 33 additions and 3 deletions
|
@ -744,9 +744,20 @@ def install(module, items, repoq, yum_basecmd, conf_file, en_repos, dis_repos, i
|
|||
continue
|
||||
pkg = package
|
||||
|
||||
#groups :(
|
||||
# groups
|
||||
elif spec.startswith('@'):
|
||||
# complete wild ass guess b/c it's a group
|
||||
found = False
|
||||
my = yum_base()
|
||||
groups_list = my.doGroupLists()
|
||||
for group in groups_list[0]: # list of the installed groups on the first index
|
||||
spec_lower = spec.lower()
|
||||
if spec_lower.endswith(group.name.lower()) or spec_lower.endswith(group.groupid.lower()):
|
||||
found = True
|
||||
break
|
||||
|
||||
if found:
|
||||
continue
|
||||
|
||||
pkg = spec
|
||||
|
||||
# range requires or file-requires or pkgname :(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue