From: Guillaume Abrioux Date: Tue, 29 Mar 2022 13:54:13 +0000 (+0200) Subject: Revert "validate: fix wrong conditions" X-Git-Tag: v3.2.58~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=540aa1455bc919c63ee6a875cc091f3beef9bdb9;p=ceph-ansible.git Revert "validate: fix wrong conditions" This reverts commit 7de2f0e3428b6250a512fb2eda2d8d839a4547a5. Signed-off-by: Guillaume Abrioux --- diff --git a/roles/ceph-facts/tasks/facts.yml b/roles/ceph-facts/tasks/facts.yml index a8a4daeb3..0cb638b2f 100644 --- a/roles/ceph-facts/tasks/facts.yml +++ b/roles/ceph-facts/tasks/facts.yml @@ -161,7 +161,7 @@ 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) @@ -170,7 +170,7 @@ 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) @@ -178,7 +178,7 @@ 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) diff --git a/roles/ceph-osd/tasks/main.yml b/roles/ceph-osd/tasks/main.yml index 335e145c9..99fadec16 100644 --- a/roles/ceph-osd/tasks/main.yml +++ b/roles/ceph-osd/tasks/main.yml @@ -116,7 +116,7 @@ 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 diff --git a/roles/ceph-validate/tasks/check_devices.yml b/roles/ceph-validate/tasks/check_devices.yml index 53d33b5cf..4afb3dcf6 100644 --- a/roles/ceph-validate/tasks/check_devices.yml +++ b/roles/ceph-validate/tasks/check_devices.yml @@ -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: