2014-03-10 23:52:31 +08:00
|
|
|
---
|
|
|
|
## SCENARIO 1: JOURNAL AND OSD_DATA ON THE SAME DEVICE
|
|
|
|
|
2014-12-17 21:48:03 +08:00
|
|
|
- include: zap_devices.yml
|
2014-09-05 03:14:11 +08:00
|
|
|
- include: check_devices.yml
|
2014-03-10 23:52:31 +08:00
|
|
|
|
|
|
|
# NOTE (leseb): the prepare process must be parallelized somehow...
|
|
|
|
# if you have 64 disks with 4TB each, this will take a while
|
|
|
|
# since Ansible will sequential process the loop
|
|
|
|
|
2014-06-26 20:19:09 +08:00
|
|
|
# NOTE (alahouze): if the device is a partition, the parted command below has
|
|
|
|
# failed, this is why we check if the device is a partition too.
|
2015-05-16 00:27:41 +08:00
|
|
|
- name: automatic prepare OSD disk(s) without partitions
|
2014-11-13 22:19:18 +08:00
|
|
|
command: ceph-disk prepare "/dev/{{ item.key }}"
|
|
|
|
when: ansible_devices is defined and item.value.removable == "0" and item.value.partitions|count == 0 and journal_collocation and osd_auto_discovery
|
|
|
|
ignore_errors: True
|
|
|
|
with_dict: ansible_devices
|
|
|
|
register: prepared_osds
|
2014-06-26 20:19:09 +08:00
|
|
|
|
2015-05-16 00:27:41 +08:00
|
|
|
- name: manually Prepare OSD disk(s)
|
2014-09-05 03:14:11 +08:00
|
|
|
command: "ceph-disk prepare {{ item.2 }}"
|
2014-11-13 22:19:18 +08:00
|
|
|
when: (item.0.rc != 0 or item.1.rc != 0) and journal_collocation and not osd_auto_discovery
|
2014-03-10 23:52:31 +08:00
|
|
|
ignore_errors: True
|
|
|
|
with_together:
|
|
|
|
- parted.results
|
2014-06-26 20:19:09 +08:00
|
|
|
- ispartition.results
|
2014-03-10 23:52:31 +08:00
|
|
|
- devices
|
|
|
|
|
2014-09-05 03:14:11 +08:00
|
|
|
- include: activate_osds.yml
|