ceph-ansible/roles/ceph-osd/tasks/check_gpt.yml

22 lines
505 B
YAML
Raw Normal View History

---
- name: check the partition status of the osd disks
command: "parted --script {{ item }} print"
with_items:
- "{{ devices }}"
changed_when: false
failed_when: false
check_mode: no
register: osd_partition_status_results
- name: create gpt disk label
2017-12-01 01:46:55 +08:00
parted:
device: "{{ item.1 }}"
label: gpt
with_together:
- "{{ osd_partition_status_results.results }}"
- "{{ devices }}"
changed_when: false
when:
- not item.0.get("skipped")
- item.0.get("rc", 0) != 0