From: Guillaume Abrioux Date: Tue, 19 Dec 2017 09:55:02 +0000 (+0100) Subject: osd: fix check gpt X-Git-Tag: v3.0.16~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=87fc8e6dc983f4db512d490aa81c2b4a26fda445;p=ceph-ansible.git osd: fix check gpt the gpt label creation doesn't work even with parted module. This commit fixes the gpt label creation by using parted command instead. Signed-off-by: Guillaume Abrioux (cherry picked from commit 895949d6c463c227da3dd7250c2ae228ee269872) Signed-off-by: Sébastien Han --- 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 }}"