1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

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

This commit is contained in:
James Tanner 2013-11-12 10:37:27 -05:00
parent 48ded5e493
commit 710117e4da

View file

@ -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