diff --git a/roles/ceph-osd/tasks/check_gpt.yml b/roles/ceph-osd/tasks/check_gpt.yml index 79371eb1e..8f72fd3ee 100644 --- a/roles/ceph-osd/tasks/check_gpt.yml +++ b/roles/ceph-osd/tasks/check_gpt.yml @@ -1,6 +1,6 @@ --- - name: check the partition status of the osd disks - command: "parted --script {{ item }} print" + command: "blkid -t PTTYPE=\"gpt\" {{ item }}" with_items: - "{{ devices }}" changed_when: false @@ -9,9 +9,7 @@ register: osd_partition_status_results - name: create gpt disk label - parted: - device: "{{ item.1 }}" - label: gpt + command: "parted -s {{ item.1 }} mklabel gpt" with_together: - "{{ osd_partition_status_results.results }}" - "{{ devices }}"