ceph-config: don't check for devices on existing osds

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>
pull/7333/head
Seena Fallah 2022-09-24 19:21:41 +02:00 committed by Guillaume Abrioux
parent ac4dfa7526
commit 57b0890aff
1 changed files with 0 additions and 4 deletions

View File

@ -89,14 +89,10 @@
CEPH_CONTAINER_BINARY: "{{ container_binary }}" CEPH_CONTAINER_BINARY: "{{ container_binary }}"
PYTHONIOENCODING: utf-8 PYTHONIOENCODING: utf-8
changed_when: false changed_when: false
when:
- devices | default([]) | length > 0
- name: set_fact num_osds (add existing osds) - name: set_fact num_osds (add existing osds)
set_fact: set_fact:
num_osds: "{{ lvm_list.stdout | default('{}') | from_json | length | int + num_osds | default(0) | int }}" 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 - name: set osd related config facts
when: inventory_hostname in groups.get(osd_group_name, []) when: inventory_hostname in groups.get(osd_group_name, [])