mirror of https://github.com/ceph/ceph-ansible.git
38 lines
1.1 KiB
YAML
38 lines
1.1 KiB
YAML
---
|
|
## SCENARIO 1: JOURNAL AND OSD_DATA ON THE SAME DEVICE
|
|
|
|
- include: ../check_devices.yml
|
|
|
|
# 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
|
|
|
|
# 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.
|
|
- name: automatic prepare osd disk(s) without partitions
|
|
command: ceph-disk prepare "/dev/{{ item.key }}"
|
|
ignore_errors: true
|
|
register: prepared_osds
|
|
with_dict: ansible_devices
|
|
when:
|
|
ansible_devices is defined and
|
|
item.value.removable == "0" and
|
|
item.value.partitions|count == 0 and
|
|
journal_collocation and
|
|
osd_auto_discovery
|
|
|
|
- name: manually Prepare osd disk(s)
|
|
command: "ceph-disk prepare {{ item.2 }}"
|
|
ignore_errors: true
|
|
with_together:
|
|
- parted.results
|
|
- ispartition.results
|
|
- devices
|
|
when:
|
|
item.0.rc != 0 and
|
|
item.1.rc != 0 and
|
|
journal_collocation and not
|
|
osd_auto_discovery
|
|
|
|
- include: ../activate_osds.yml
|