mirror of https://github.com/ceph/ceph-ansible.git
ceph-volume.py: add support for batch refactored code
See https://github.com/ceph/ceph/pull/34740 for the batch changes.
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
(cherry picked from commit d90834b77f
)
pull/5580/head
parent
328db8bee1
commit
3e4c2e33e6
|
@ -703,10 +703,17 @@ def run_module():
|
||||||
module.fail_json(msg='non-zero return code', **result)
|
module.fail_json(msg='non-zero return code', **result)
|
||||||
|
|
||||||
if not report:
|
if not report:
|
||||||
# if not asking for a report, let's just run the batch command
|
if 'changed' in report_result:
|
||||||
changed = report_result['changed']
|
# we have the old batch implementation
|
||||||
if changed:
|
# if not asking for a report, let's just run the batch command
|
||||||
# Batch prepare the OSD
|
changed = report_result['changed']
|
||||||
|
if changed:
|
||||||
|
# Batch prepare the OSD
|
||||||
|
rc, cmd, out, err = exec_command(
|
||||||
|
module, batch(module, container_image))
|
||||||
|
else:
|
||||||
|
# we have the refactored batch, its idempotent so lets just
|
||||||
|
# run it
|
||||||
rc, cmd, out, err = exec_command(
|
rc, cmd, out, err = exec_command(
|
||||||
module, batch(module, container_image))
|
module, batch(module, container_image))
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue