mirror of https://github.com/ceph/ceph-ansible.git
module_utils/ca_common: Add optional diff argument to exit_module
Add optional `diff` argument defaulting to `{ "before": "", "after": ""}`. Signed-off-by: Mathias Chapelain <mathias.chapelain@proton.ch>pull/7052/head
parent
3e5bc30c87
commit
055326be7c
|
@ -84,7 +84,7 @@ def exec_command(module, cmd, stdin=None):
|
|||
return rc, cmd, out, err
|
||||
|
||||
|
||||
def exit_module(module, out, rc, cmd, err, startd, changed=False):
|
||||
def exit_module(module, out, rc, cmd, err, startd, changed=False, diff=dict(before="", after="")):
|
||||
endd = datetime.datetime.now()
|
||||
delta = endd - startd
|
||||
|
||||
|
@ -97,6 +97,7 @@ def exit_module(module, out, rc, cmd, err, startd, changed=False):
|
|||
stdout=out.rstrip("\r\n"),
|
||||
stderr=err.rstrip("\r\n"),
|
||||
changed=changed,
|
||||
diff=diff
|
||||
)
|
||||
module.exit_json(**result)
|
||||
|
||||
|
|
Loading…
Reference in New Issue