Commit 86c224e7 authored by Guillaume Abrioux's avatar Guillaume Abrioux Committed by Dimitri Savineau
Browse files

validate: fix gpt header check

Check for gpt header when osd scenario is lvm or lvm batch.


Signed-off-by: default avatarGuillaume Abrioux <>
parent b3abe234
- name: devices validation
- name: check no gpt header is present when osd scenario is lvm/lvm-batch
when: osd_scenario == 'lvm'
- name: read information about the devices
device: "{{ item }}"
device: "{{ if item.data_vg is undefined and lvm_volumes is defined else item if devices is defined else omit }}"
unit: MiB
register: parted_results
with_items: "{{ devices }}"
with_items: "{{ lvm_volumes | default(devices) }}"
- inventory_hostname in groups.get(osd_group_name, [])
- ( is defined and item.data_vg is undefined) or devices is defined
- name: fail when gpt header found on osd devices
msg: "{{ }} has gpt header, please remove it."
with_items: "{{ parted_results.results }}"
- item.skipped is undefined
- item.disk.table == 'gpt'
- item.partitions | length == 0
- name: check devices are block devices
when: devices is defined
- name: get devices information
device: "{{ item }}"
......@@ -29,8 +37,6 @@
msg: "{{ item.item }} is not a block special file!"
when: item.rc is defined
with_items: "{{ devices_parted.results }}"
- devices is defined
- name: get dedicated_device information
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment