]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
lvm_setup: lookup device from inventory, default to /dev/sd* names
authorJan Fajerski <jfajerski@suse.com>
Mon, 10 Feb 2020 09:09:14 +0000 (10:09 +0100)
committerGuillaume Abrioux <gabrioux@redhat.com>
Tue, 16 Jun 2020 16:17:34 +0000 (18:17 +0200)
This fixes a long standing fail in ceph-volumes lvm test suite.
Otherwise the default behaviour should not change.

Signed-off-by: Jan Fajerski <jfajerski@suse.com>
tests/functional/lvm_setup.yml

index 1c519193721bda363a5f68d7edece09733d31b83..35aeb6889d89c6211f3541d159f495c227f21c8a 100644 (file)
@@ -29,7 +29,7 @@
     - name: create volume group
       lvg:
         vg: test_group
-        pvs: /dev/sdb
+        pvs: "{{ pv_devices[0] | default('/dev/sdb') }}"
     - name: create logical volume 1
       lvol:
         vg: test_group
@@ -40,9 +40,9 @@
         vg: test_group
         lv: data-lv2
         size: 100%FREE
-    - name: partition /dev/sdc for journals
+    - name: partition  "{{ pv_devices[1] | default('/dev/sdc') }}"for journals
       parted:
-        device: /dev/sdc
+        device: "{{ pv_devices[1] | default('/dev/sdc') }}"
         number: 1
         part_start: 0%
         part_end: 50%
@@ -50,9 +50,9 @@
         label: gpt
         state: present
       tags: partitions
-    - name: partition /dev/sdc for journals
+    - name: partition  "{{ pv_devices[1] | default('/dev/sdc') }}"for journals
       parted:
-        device: /dev/sdc
+        device: "{{ pv_devices[1] | default('/dev/sdc') }}"
         number: 2
         part_start: 50%
         part_end: 100%
         state: present
         label: gpt
       tags: partitions
-    - name: create journals vg from /dev/sdc2
+    - name: create journals vg from  "{{ pv_devices[1] | default('/dev/sdc') }}2"
       lvg:
         vg: journals
-        pvs: /dev/sdc2
+        pvs: "{{ pv_devices[1] | default('/dev/sdc') }}2"
     - name: create journal1 lv
       lvol:
         vg: journals