]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commit
library: Fix new-style modules check mode
authorBenoît Knecht <bknecht@protonmail.ch>
Tue, 1 Sep 2020 11:06:57 +0000 (13:06 +0200)
committerDimitri Savineau <savineau.dimitri@gmail.com>
Tue, 29 Sep 2020 00:41:51 +0000 (20:41 -0400)
commitab458a959252f595bdd4a96db1b4af486e9a9de4
tree1a19b288d5fde202ab22398625ec4e1b4ac46830
parentbabc8a05fd8e7c30928eab3b727d2ddaceb8a3d5
library: Fix new-style modules check mode

Running the `ceph_crush.py`, `ceph_key.py` or `ceph_volume.py` modules in check
mode resulted in the following error:

```
New-style module did not handle its own exit
```

This was due to the fact that they simply returned a `dict` in that case,
instead of calling `module.exit_json()`.

Signed-off-by: Benoît Knecht <bknecht@protonmail.ch>
(cherry picked from commit 85dd4058145436e86a12ad9f015f5228189437d5)
library/ceph_crush.py
library/ceph_key.py
library/ceph_pool.py
library/ceph_volume.py