From: Guillaume Abrioux Date: Tue, 29 Mar 2022 13:56:30 +0000 (+0200) Subject: validate: fix check_devices X-Git-Tag: v3.2.58 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ff4c31be85edb3450a38d6ccb2f6dd1f1a70ad24;p=ceph-ansible.git validate: fix check_devices This fixes a regression introduced in 3.2.57 and the check_devices step. When lvm_volumes is defined with data and data_vg (vg/lv format) it goes to the second part of the condition which throws an undefined error given that `devices` isn't defined. Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2069491 Signed-off-by: Guillaume Abrioux --- diff --git a/roles/ceph-validate/tasks/check_devices.yml b/roles/ceph-validate/tasks/check_devices.yml index 4afb3dcf6..ca9ded68c 100644 --- a/roles/ceph-validate/tasks/check_devices.yml +++ b/roles/ceph-validate/tasks/check_devices.yml @@ -65,7 +65,7 @@ with_items: "{{ lvm_volumes | default(devices) }}" when: - inventory_hostname in groups.get(osd_group_name, []) - - (item.data is defined and item.data_vg is undefined) or devices is defined + - (item.data is defined and item.data_vg is undefined) or devices | default([]) | length > 0 - name: fail when gpt header found on osd devices fail: