]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Revert "validate: fix wrong conditions"
authorGuillaume Abrioux <gabrioux@redhat.com>
Tue, 29 Mar 2022 13:54:13 +0000 (15:54 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Tue, 29 Mar 2022 14:16:26 +0000 (16:16 +0200)
This reverts commit 7de2f0e3428b6250a512fb2eda2d8d839a4547a5.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
roles/ceph-facts/tasks/facts.yml
roles/ceph-osd/tasks/main.yml
roles/ceph-validate/tasks/check_devices.yml

index a8a4daeb3fc104e48a77b0cfe65c4d302213c271..0cb638b2f9e8fc178269b44bf03696bbe11f7152 100644 (file)
   with_items: "{{ devices }}"
   register: devices_prepare_canonicalize
   when:
-    - devices | length > 0
+    - devices is defined
     - inventory_hostname in groups.get(osd_group_name, [])
     - not osd_auto_discovery|default(False)
 
     devices: "{{ devices | default([]) + [ item.stdout ] }}"
   with_items: "{{ devices_prepare_canonicalize.results }}"
   when:
-    - devices | length > 0
+    - devices is defined
     - inventory_hostname in groups.get(osd_group_name, [])
     - not osd_auto_discovery|default(False)
 
   set_fact:
     devices: "{{ devices | reject('search','/dev/disk') | list | unique }}"
   when:
-    - devices | length > 0
+    - devices is defined
     - inventory_hostname in groups.get(osd_group_name, [])
     - not osd_auto_discovery|default(False)
 
index 335e145c977943e5020c68a4fa68440c1d3de0e2..99fadec16303e7c6bf0499ebf158fc159480b237 100644 (file)
   delegate_to: "{{ groups[mon_group_name][0] }}"
   until:
     - (wait_for_all_osds_up.stdout | default('{}') | from_json)["osdmap"]["osdmap"]["num_osds"] | int > 0
-    - (wait_for_all_osds_up.stdout | default('{}') | from_json)["osdmap"]["osdmap"]["num_osds"] == (wait_for_all_osds_up.stdout | default('{}') from_json)["osdmap"]["osdmap"]["num_up_osds"]
+    - (wait_for_all_osds_up.stdout | default('{}') | from_json)["osdmap"]["osdmap"]["num_osds"] == (wait_for_all_osds_up.stdout | default('{}') from_json)["osdmap"]["osdmap"]["num_up_osds"]
   when:
     - inventory_hostname == ansible_play_hosts_all | last
 
index 53d33b5cfb33730fe80394fefadba0f610effc89..4afb3dcf6267351f4d780b330fefdc940491c92e 100644 (file)
@@ -65,7 +65,7 @@
       with_items: "{{ lvm_volumes | default(devices) }}"
       when:
         - inventory_hostname in groups.get(osd_group_name, [])
-        - (item.data is defined and item.data_vg is undefined) or devices | length > 0
+        - (item.data is defined and item.data_vg is undefined) or devices is defined
 
     - name: fail when gpt header found on osd devices
       fail: