diff --git a/roles/ceph-osd/tasks/scenarios/raw_multi_journal.yml b/roles/ceph-osd/tasks/scenarios/raw_multi_journal.yml index eb2714838..71c901a0b 100644 --- a/roles/ceph-osd/tasks/scenarios/raw_multi_journal.yml +++ b/roles/ceph-osd/tasks/scenarios/raw_multi_journal.yml @@ -18,6 +18,7 @@ - raw_journal_devices changed_when: false ignore_errors: true + register: prepare_osd_disk when: - not item.0.get("skipped") - not item.1.get("skipped") @@ -26,4 +27,13 @@ - raw_multi_journal - not osd_auto_discovery +- name: fail if ceph-disk cannot prepare an OSD + fail: + msg: "ceph-disk failed to prepare an OSD" + when: + - " 'ceph-disk: Error:' in item.get('stderr', '') " + - " 'Failed to add' in item.get('stderr', '') " + - item.get("rc") != 0 + with_items: "{{prepare_osd_disk.results}}" + - include: ../activate_osds.yml