mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Returns reason on pkg update error (#44982)
Previously, it returned no additional information: "msg": "Could not update catalogue" Now it passes that reason with the error message: {"changed": false, "msg": "Could not update catalogue [77]: pkg: Insufficient privileges to update the repository catalogue.\n"}
This commit is contained in:
parent
cd5d484f7a
commit
8fb589d55e
1 changed files with 1 additions and 1 deletions
|
@ -209,7 +209,7 @@ def install_packages(module, pkgng_path, packages, cached, pkgsite, dir_arg, sta
|
|||
else:
|
||||
rc, out, err = module.run_command("%s %s update" % (pkgng_path, dir_arg))
|
||||
if rc != 0:
|
||||
module.fail_json(msg="Could not update catalogue")
|
||||
module.fail_json(msg="Could not update catalogue [%d]: %s %s" % (rc, out, err))
|
||||
|
||||
for package in packages:
|
||||
already_installed = query_package(module, pkgng_path, package, dir_arg)
|
||||
|
|
Loading…
Reference in a new issue