]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
osd: fix check gpt
authorGuillaume Abrioux <gabrioux@redhat.com>
Tue, 19 Dec 2017 09:55:02 +0000 (10:55 +0100)
committerSébastien Han <seb@redhat.com>
Wed, 20 Dec 2017 16:42:45 +0000 (17:42 +0100)
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 <gabrioux@redhat.com>
roles/ceph-osd/tasks/check_gpt.yml

index 79371eb1ecf17f4a33277c3a28cacee08630628e..8f72fd3ee822a941093884fba072e490efdda8d0 100644 (file)
@@ -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 }}"