mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
* java_certs : Not enough info on error
Just bumped into an issue when the message was "Internal module failure, cannot extract public certificate from pkcs12, error: "
Seems that the issue #2560 doesn't cover all cases. To make debugging easier, I propose to add error output on json return instead of only expose standard output.
* java_certs - add missing fragment message
* Word-smithing.
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 1ca775248f
)
Co-authored-by: Naewis <Naewis@users.noreply.github.com>
This commit is contained in:
parent
a0d4ee4fc1
commit
ced1baad63
2 changed files with 4 additions and 1 deletions
|
@ -0,0 +1,2 @@
|
|||
minor_changes:
|
||||
- java_certs - add more detailed error output when extracting certificate from PKCS12 fails (https://github.com/ansible-collections/community.general/pull/5550).
|
|
@ -281,7 +281,8 @@ def _export_public_cert_from_pkcs12(module, executable, pkcs_file, alias, passwo
|
|||
(export_rc, export_stdout, export_err) = module.run_command(export_cmd, data=password, check_rc=False)
|
||||
|
||||
if export_rc != 0:
|
||||
module.fail_json(msg="Internal module failure, cannot extract public certificate from pkcs12, error: %s" % export_stdout,
|
||||
module.fail_json(msg="Internal module failure, cannot extract public certificate from PKCS12, message: %s" % export_stdout,
|
||||
stderr=export_err,
|
||||
rc=export_rc)
|
||||
|
||||
with open(dest, 'w') as f:
|
||||
|
|
Loading…
Reference in a new issue