]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
ceph-defaults: fix failing tasks when osd_scenario was not set correctly
authorAndrew Schoen <aschoen@redhat.com>
Tue, 1 May 2018 16:22:31 +0000 (11:22 -0500)
committerGuillaume Abrioux <gabrioux@redhat.com>
Fri, 18 May 2018 15:58:24 +0000 (17:58 +0200)
When devices is not defined because you want to use the 'lvm'
osd_scenario but you've made a mistake selecting that scenario these
tasks should not fail.

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

index eb927bcb4213bf6c95994d9ee7833917cd6153a1..b3e28b3682dce64fc59434c989acd6581c0261f9 100644 (file)
   with_items: "{{ devices }}"
   register: devices_prepare_canonicalize
   when:
+    - devices is defined
     - inventory_hostname in groups.get(osd_group_name, [])
     - not osd_auto_discovery|default(False)
     - osd_scenario|default('dummy') != 'lvm'
     devices: "{{ devices | default([]) + [ item.stdout ] }}"
   with_items: "{{ devices_prepare_canonicalize.results }}"
   when:
+    - devices is defined
     - inventory_hostname in groups.get(osd_group_name, [])
     - not osd_auto_discovery|default(False)
     - osd_scenario|default('dummy') != 'lvm'
   set_fact:
     devices: "{{ devices | reject('search','/dev/disk') | list | unique }}"
   when:
+    - devices is defined
     - inventory_hostname in groups.get(osd_group_name, [])
     - not osd_auto_discovery|default(False)
     - osd_scenario|default('dummy') != 'lvm'