From bc570619b6dce7263077982c0fb31300b0b2eb75 Mon Sep 17 00:00:00 2001 From: Dimitri Savineau Date: Tue, 6 Jul 2021 11:52:13 -0400 Subject: [PATCH] Revert "ceph-validate: use root device from ansible_mounts" This reverts commit b1542fd3403b18eaeba7b336d5225047b1560027. Signed-off-by: Dimitri Savineau --- roles/ceph-validate/tasks/check_devices.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/roles/ceph-validate/tasks/check_devices.yml b/roles/ceph-validate/tasks/check_devices.yml index 6fa218942..a8e2622bd 100644 --- a/roles/ceph-validate/tasks/check_devices.yml +++ b/roles/ceph-validate/tasks/check_devices.yml @@ -1,7 +1,17 @@ --- +- name: find device used for operating system + command: findmnt -v -n -T / -o SOURCE + changed_when: false + register: root_device + +- name: resolve root_device + command: "readlink -f {{ root_device.stdout }}" + changed_when: false + register: _root_device + - name: set_fact root_device set_fact: - root_device: "{{ ansible_facts['mounts'] | selectattr('mount', 'match', '^/$') | map(attribute='device') | first }}" + root_device: "{{ _root_device.stdout }}" - name: lvm_volumes variable's tasks related when: