1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

yum: cover "Nothing to do" not only for groups (#28283)

This commit is contained in:
Martin Krizek 2017-08-16 17:24:51 +02:00 committed by GitHub
parent 8a6e1531b7
commit bcb9644f39

View file

@ -688,11 +688,8 @@ def exec_install(module, items, action, pkgs, res, yum_basecmd):
res['msg'] += err
res['changed'] = True
# special case for groups
for spec in items:
if spec.startswith('@'):
if ('Nothing to do' in out and rc == 0) or ('does not have any packages to install' in err):
res['changed'] = False
if ('Nothing to do' in out and rc == 0) or ('does not have any packages to install' in err):
res['changed'] = False
if rc != 0:
res['changed'] = False