From ba572f9d473212506be70df57723fb0f5f9ba329 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20Loli=C3=A9e?= Date: Tue, 3 Oct 2023 14:58:24 +0200 Subject: [PATCH] Fix module's error message Before this change the error message is always: ``` msg: 'err : { err } ; out : { out }' ``` After this change the real command output is printed ! --- goss.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/goss.py b/goss.py index f173c14..da90873 100644 --- a/goss.py +++ b/goss.py @@ -134,7 +134,7 @@ def run_module(): write_result(output_file_path, out) if rc is not None and rc != 0: - error_msg = 'err : { err } ; out : { out }' + error_msg = f'err : { err } ; out : { out }' module.fail_json(msg=error_msg) module.exit_json(stdout=out, changed=False)