Commit 710117e4 by James Tanner

Addresses #4628 evaluate package check return properly and exit failure if not present

parent 48ded5e4
...@@ -123,8 +123,8 @@ def install_packages(module, pkgin_path, packages, cached, pkgsite): ...@@ -123,8 +123,8 @@ def install_packages(module, pkgin_path, packages, cached, pkgsite):
if not module.check_mode: if not module.check_mode:
rc, out, err = module.run_command("%s %s install -U -y %s" % (pkgsite, pkgin_path, package)) 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): if not module.check_mode and not query_package(module, pkgin_path, package):
module.fail_json(msg="failed to install %s: %s" % (package, out)) module.fail_json(msg="failed to install %s: %s" % (package, out), stderr=err)
install_c += 1 install_c += 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment