From 7cd3d9cc1acdd76fedff9e98f8c86ce43742ad09 Mon Sep 17 00:00:00 2001 From: Adam Miller Date: Mon, 26 Mar 2018 03:46:24 -0500 Subject: [PATCH] Correct msg to detect idempotent yum groupinstall (#37858) The message text used to check stderr for a warning about groupinstall in order to determine if a change occurred is specific to the version of yum that is in RHEL7 and newer. This change simply removes a couple words off the end in order to only use text found in the warning message in older versions of yum. Fixes #35982 Signed-off-by: Adam Miller --- lib/ansible/modules/packaging/os/yum.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/packaging/os/yum.py b/lib/ansible/modules/packaging/os/yum.py index 0c79243279..814595061f 100644 --- a/lib/ansible/modules/packaging/os/yum.py +++ b/lib/ansible/modules/packaging/os/yum.py @@ -770,7 +770,7 @@ def exec_install(module, items, action, pkgs, res, yum_basecmd): res['msg'] += err res['changed'] = True - if ('Nothing to do' in out and rc == 0) or ('does not have any packages to install' in err): + if ('Nothing to do' in out and rc == 0) or ('does not have any packages' in err): res['changed'] = False if rc != 0: