]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
ceph-config: don't check for devices on existing osds
authorSeena Fallah <seenafallah@gmail.com>
Sat, 24 Sep 2022 17:21:41 +0000 (19:21 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Wed, 12 Oct 2022 08:49:03 +0000 (10:49 +0200)
When osd_auto_discovery is true the `devices` var will be empty (as the disks have holders).
Also in general there is no need to check for devices to list the devices with ceph-volume as we have `default({})` on the stdout in `num_osds` set fact in the next task

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit 57b0890aff91412fbdccbe0ec250ec06f4015f80)

roles/ceph-config/tasks/main.yml

index 796a80f2307167db6e98c19a2be825921a779dd7..fc9a90e2b765efd8fa36e55b7a8cd9fd03711f9c 100644 (file)
         CEPH_CONTAINER_BINARY: "{{ container_binary }}"
         PYTHONIOENCODING: utf-8
       changed_when: false
-      when:
-        - devices | default([]) | length > 0
 
     - name: set_fact num_osds (add existing osds)
       set_fact:
         num_osds: "{{ lvm_list.stdout | default('{}') | from_json | length | int + num_osds | default(0) | int }}"
-      when:
-        - devices | default([]) | length > 0
 
 - name: set osd related config facts
   when: inventory_hostname in groups.get(osd_group_name, [])