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 <gabrioux@redhat.com>
pull/2291/head
Guillaume Abrioux 2017-12-19 10:55:02 +01:00 committed by Sébastien Han
parent c5b7b37105
commit 895949d6c4
1 changed files with 2 additions and 4 deletions

View 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 }}"