mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
mksysb: improve visibility on the output (#6269)
* mksysb: improve visibility on the output * add changelog frag
This commit is contained in:
parent
7d19eca8bf
commit
a64e36820f
2 changed files with 5 additions and 2 deletions
2
changelogs/fragments/6269-mksysb-output.yml
Normal file
2
changelogs/fragments/6269-mksysb-output.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
minor_changes:
|
||||
- mksysb - improved the output of the module in case of errors (https://github.com/ansible-collections/community.general/issues/6263).
|
|
@ -146,8 +146,7 @@ class MkSysB(ModuleHelper):
|
|||
def __run__(self):
|
||||
def process(rc, out, err):
|
||||
if rc != 0:
|
||||
self.do_raise("mksysb failed.")
|
||||
self.vars.msg = out
|
||||
self.do_raise("mksysb failed: {0}".format(out))
|
||||
|
||||
runner = CmdRunner(
|
||||
self.module,
|
||||
|
@ -158,6 +157,8 @@ class MkSysB(ModuleHelper):
|
|||
'extended_attrs', 'backup_crypt_files', 'backup_dmapi_fs', 'new_image_data', 'combined_path'],
|
||||
output_process=process, check_mode_skip=True) as ctx:
|
||||
ctx.run(combined_path=[self.vars.storage_path, self.vars.name])
|
||||
if self.verbosity >= 4:
|
||||
self.vars.run_info = ctx.run_info
|
||||
|
||||
self.changed = True
|
||||
|
||||
|
|
Loading…
Reference in a new issue