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

38 lines
1.1 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
2014-11-13 22:19:18 +08:00
command: ceph-disk prepare "/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)
2014-09-05 03:14:11 +08:00
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