]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Revert "ceph-validate: use root device from ansible_mounts"
authorDimitri Savineau <dsavinea@redhat.com>
Tue, 6 Jul 2021 15:52:13 +0000 (11:52 -0400)
committerGuillaume Abrioux <gabrioux@redhat.com>
Wed, 7 Jul 2021 15:19:35 +0000 (17:19 +0200)
This reverts commit b1542fd3403b18eaeba7b336d5225047b1560027.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
roles/ceph-validate/tasks/check_devices.yml

index 6fa21894203884e68f04dc17a990ee5d3b496866..a8e2622bd3c1ba0581d77a14ee72abf202b1b296 100644 (file)
@@ -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: