2014-12-17 21:48:03 +08:00
|
|
|
---
|
|
|
|
# NOTE (leseb): some devices might miss partition label which which will result
|
|
|
|
# in ceph-disk failing to prepare OSD. Thus zapping them prior to prepare the OSD
|
|
|
|
# ensures that the device will get successfully prepared.
|
2015-05-16 00:27:41 +08:00
|
|
|
- name: erasing partitions and labels from OSD disk(s)
|
2015-07-07 00:53:31 +08:00
|
|
|
command: ceph-disk zap {{ item.2 }}
|
2015-06-26 06:26:03 +08:00
|
|
|
changed_when: false
|
2015-07-07 00:53:31 +08:00
|
|
|
with_together:
|
|
|
|
- parted.results
|
|
|
|
- ispartition.results
|
|
|
|
- devices
|
2015-06-26 06:26:03 +08:00
|
|
|
when:
|
2015-07-07 00:53:31 +08:00
|
|
|
item.0.rc != 0 and
|
|
|
|
item.1.rc != 0 and
|
2015-06-26 06:26:03 +08:00
|
|
|
zap_devices and
|
|
|
|
(journal_collocation or raw_multi_journal)
|
2014-12-17 21:48:03 +08:00
|
|
|
|
2015-05-16 00:27:41 +08:00
|
|
|
- name: erasing partitions and labels from the journal device(s)
|
2015-07-07 00:53:31 +08:00
|
|
|
command: ceph-disk zap {{ item.2 }}
|
2015-06-26 06:26:03 +08:00
|
|
|
changed_when: false
|
2015-07-07 00:53:31 +08:00
|
|
|
with_together:
|
|
|
|
- parted.results
|
|
|
|
- ispartition.results
|
|
|
|
- raw_journal_devices
|
2015-06-26 06:26:03 +08:00
|
|
|
when:
|
2015-07-07 00:53:31 +08:00
|
|
|
item.0.rc != 0 and
|
|
|
|
item.1.rc != 0 and
|
2015-06-26 06:26:03 +08:00
|
|
|
zap_devices and
|
|
|
|
raw_multi_journal
|