2017-11-18 00:32:23 +08:00
|
|
|
---
|
|
|
|
- name: check the partition status of the osd disks
|
2017-12-19 17:55:02 +08:00
|
|
|
command: "blkid -t PTTYPE=\"gpt\" {{ item }}"
|
2017-11-18 00:32:23 +08:00
|
|
|
with_items:
|
|
|
|
- "{{ devices }}"
|
|
|
|
changed_when: false
|
|
|
|
failed_when: false
|
|
|
|
check_mode: no
|
|
|
|
register: osd_partition_status_results
|
|
|
|
|
|
|
|
- name: create gpt disk label
|
2017-12-19 17:55:02 +08:00
|
|
|
command: "parted -s {{ item.1 }} mklabel gpt"
|
2017-11-18 00:32:23 +08:00
|
|
|
with_together:
|
|
|
|
- "{{ osd_partition_status_results.results }}"
|
|
|
|
- "{{ devices }}"
|
|
|
|
changed_when: false
|
|
|
|
when:
|
|
|
|
- not item.0.get("skipped")
|
|
|
|
- item.0.get("rc", 0) != 0
|