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