- name: include build_devices.yml
include: build_devices.yml
-- name: check if a partition named 'ceph' exists
- shell: "parted --script {{ item }} print | egrep -sq '^ 1.*ceph'"
- with_items:
- - "{{ devices }}"
- changed_when: false
- failed_when: false
- check_mode: no
+- name: read information about the devices
+ parted:
+ device: "{{ item }}"
+ unit: MiB
register: parted_results
+ with_items: "{{ devices }}"
- name: include copy_configs.yml
include: copy_configs.yml
when:
- not osd_auto_discovery
- containerized_deployment
- - not item.0.get("skipped")
- - item.0.get("rc", 0) != 0
+ - item.0.partitions|length == 0
- name: automatic prepare ceph containerized osd disk collocated
shell: |
- "{{ devices }}"
when:
- not containerized_deployment
- - not item.0.get("skipped")
- - item.0.get("rc", 0) != 0
+ - item.0.partitions|length == 0
\ No newline at end of file
when:
- containerized_deployment
- osd_objectstore == 'filestore'
- - not item.0.get("skipped")
- - item.0.get("rc", 0) != 0
+ - item.0.partitions|length == 0
- name: prepare ceph "{{ osd_objectstore }}" containerized osd disk(s) non-collocated with a dedicated device for db and wal
shell: |
when:
- containerized_deployment
- osd_objectstore == 'bluestore'
- - not item.0.get("skipped")
- - item.0.get("rc", 0) != 0
+ - item.0.partitions|length == 0
- name: prepare ceph "{{ osd_objectstore }}" non-containerized osd disk(s) non-collocated
command: "ceph-disk prepare {{ ceph_disk_cli_options }} {{ item.1 }} {{ item.2 }}"
when:
- osd_objectstore == 'filestore'
- not containerized_deployment
- - not item.0.get("skipped")
- - item.0.get("rc", 0) != 0
+ - item.0.partitions|length == 0
- name: manually prepare ceph "{{ osd_objectstore }}" non-containerized osd disk(s) with a dedicated device for db and wal
command: "ceph-disk prepare {{ ceph_disk_cli_options }} --block.db {{ item.1 }} --block.wal {{ item.2 }} {{ item.3 }}"
when:
- osd_objectstore == 'bluestore'
- not containerized_deployment
- - not item.0.get("skipped")
- - item.0.get("rc", 0) != 0
+ - item.0.partitions|length == 0
\ No newline at end of file