From fbcf6e23af96eec737eb8fe013f188f36b2119fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Moser?= Date: Wed, 23 Aug 2017 10:22:16 +0200 Subject: [PATCH] yum: fix state=latest (#28547) --- lib/ansible/modules/packaging/os/yum.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ansible/modules/packaging/os/yum.py b/lib/ansible/modules/packaging/os/yum.py index fbcd9dc725..39337e8443 100644 --- a/lib/ansible/modules/packaging/os/yum.py +++ b/lib/ansible/modules/packaging/os/yum.py @@ -1104,6 +1104,8 @@ def latest(module, items, repoq, yum_basecmd, conf_file, en_repos, dis_repos, in if not out_lower.endswith("no packages marked for update") and \ not out_lower.endswith("nothing to do"): res['changed'] = True + else: + rc, out, err = [0, '', ''] res['rc'] = rc res['msg'] += err