From 57f9553798f6db71fb31a6bbbe7141f5c7aac387 Mon Sep 17 00:00:00 2001 From: Dimitri Savineau Date: Tue, 6 Jul 2021 11:52:14 -0400 Subject: [PATCH] Revert "ceph-validate: do not resolve devices" This reverts commit 2020b1310c1717c807a9baf9ef7be92bdc9c6a11. Signed-off-by: Dimitri Savineau --- roles/ceph-validate/tasks/check_devices.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/roles/ceph-validate/tasks/check_devices.yml b/roles/ceph-validate/tasks/check_devices.yml index a8e2622bd..4644b374f 100644 --- a/roles/ceph-validate/tasks/check_devices.yml +++ b/roles/ceph-validate/tasks/check_devices.yml @@ -33,10 +33,26 @@ when: - item.skipped is undefined +- name: devices variable's tasks related + when: + - devices is defined + - devices | length > 0 + block: + - name: resolve devices in devices + command: "readlink -f {{ item }}" + changed_when: false + register: devices_resolved + with_items: "{{ devices }}" + + - name: set_fact devices_resolved + set_fact: + _devices: "{{ _devices | default([]) + [item.stdout] }}" + with_items: "{{ devices_resolved.results }}" + - name: fail if root_device is passed in lvm_volumes or devices fail: msg: "{{ root_device }} found in either lvm_volumes or devices variable" - when: root_device in lvm_volumes_data_devices | default([]) or root_device in devices | default([]) + when: root_device in lvm_volumes_data_devices | default([]) or root_device in _devices | default([]) - name: check devices are block devices block: