ceph-config: exclude already counted osds by lvm_volumes

Exclude lvm_volumes defined disks from existing osds while it has been counted by the "count number of osds for lvm scenario" task.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit 225ae38ee2)
pull/7414/head
Seena Fallah 2023-02-26 15:11:26 +01:00 committed by Teoman ONAY
parent 7206037c5d
commit 35b8598b78
1 changed files with 1 additions and 1 deletions

View File

@ -92,7 +92,7 @@
- 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 }}"
num_osds: "{{ num_osds | int + (lvm_list.stdout | default('{}') | from_json | dict2items | map(attribute='value') | flatten | map(attribute='devices') | sum(start=[]) | difference(lvm_volumes | default([]) | map(attribute='data')) | length | int) }}"
- name: set osd related config facts
when: inventory_hostname in groups.get(osd_group_name, [])