]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
lvm: fix condition when selecting which scenario to run
authorAndrew Schoen <aschoen@redhat.com>
Thu, 9 Aug 2018 15:40:16 +0000 (10:40 -0500)
committerSébastien Han <seb@redhat.com>
Fri, 10 Aug 2018 09:46:12 +0000 (11:46 +0200)
devices and lvm_volumes will always be defined, so we need to instead
check it's length before deciding to run the scenario.

This fixes the failure here:
https://2.jenkins.ceph.com/job/ceph-ansible-prs-luminous-bluestore_lvm_osds/86/consoleFull#1667273050b5dd38fa-a56e-4233-a5ca-584604e56e3a

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
roles/ceph-osd/tasks/main.yml

index 115260f681a6f01bf81e7a8ddf93229f38844e3b..01e23e80100b550fbd0aeb2b753a420580eb1cca 100644 (file)
@@ -54,7 +54,7 @@
   include: scenarios/lvm.yml
   when:
     - osd_scenario == 'lvm'
-    - lvm_volumes is defined
+    - lvm_volumes|length > 0
     - not containerized_deployment
   # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
   static: False
@@ -63,7 +63,7 @@
   include: scenarios/lvm-batch.yml
   when:
     - osd_scenario == 'lvm'
-    - devices is defined
+    - devices|length > 0
     - not containerized_deployment
   # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
   static: False