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>
(cherry picked from commit 055326be7c
)
pull/7095/head
parent
678b868e92
commit
d6937a22fa
|
@ -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