From 710117e4da666c9d6d77528158b8b1f609025d2a Mon Sep 17 00:00:00 2001 From: James Tanner Date: Tue, 12 Nov 2013 10:37:27 -0500 Subject: [PATCH] Addresses #4628 evaluate package check return properly and exit failure if not present --- library/packaging/pkgng | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/packaging/pkgng b/library/packaging/pkgng index dbae01bbb16..b8221a999d1 100644 --- a/library/packaging/pkgng +++ b/library/packaging/pkgng @@ -123,8 +123,8 @@ def install_packages(module, pkgin_path, packages, cached, pkgsite): if not module.check_mode: rc, out, err = module.run_command("%s %s install -U -y %s" % (pkgsite, pkgin_path, package)) - if not module.check_mode and query_package(module, pkgin_path, package): - module.fail_json(msg="failed to install %s: %s" % (package, out)) + if not module.check_mode and not query_package(module, pkgin_path, package): + module.fail_json(msg="failed to install %s: %s" % (package, out), stderr=err) install_c += 1