From bcb9644f39ae7277d492f225d20dcee0684cf038 Mon Sep 17 00:00:00 2001 From: Martin Krizek Date: Wed, 16 Aug 2017 17:24:51 +0200 Subject: [PATCH] yum: cover "Nothing to do" not only for groups (#28283) --- lib/ansible/modules/packaging/os/yum.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/ansible/modules/packaging/os/yum.py b/lib/ansible/modules/packaging/os/yum.py index e924a3bdc02..2e4b89d53d2 100644 --- a/lib/ansible/modules/packaging/os/yum.py +++ b/lib/ansible/modules/packaging/os/yum.py @@ -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