ceph-ansible/roles/ceph-osd/tasks/scenarios/journal_collocation.yml

40 lines
1.2 KiB
YAML
Raw Normal View History

---
## 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 --cluster "{{ cluster }}" "/dev/{{ item.key }}"
ignore_errors: true
2014-11-13 22:19:18 +08:00
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 --cluster {{ cluster }} {{ item.2 }}"
ignore_errors: true
with_together:
- combined_parted_results.results
- combined_ispartition_results.results
- devices
when:
not item.0.get("skipped") and
not item.1.get("skipped") and
item.0.get("rc", 0) != 0 and
item.1.get("rc", 0) != 0 and
journal_collocation and not
osd_auto_discovery
- include: ../activate_osds.yml