ceph-osd: don't start the OSD services twice

Using the + operation on two lists doesn't filter out the duplicate
keys.
Currently each OSDs is started (via systemd) twice.
Instead we could use the union filter.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 4eaa65c362)
pull/5938/head
Dimitri Savineau 2020-10-13 20:43:53 -04:00 committed by Dimitri Savineau
parent 709deb90cc
commit 7c337d96d2
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@
enabled: yes enabled: yes
masked: no masked: no
daemon_reload: yes daemon_reload: yes
with_items: "{{ ((ceph_osd_ids.stdout | default('{}') | from_json).keys() | list) + osd_ids_non_container.stdout_lines | default([]) }}" with_items: "{{ ((ceph_osd_ids.stdout | default('{}') | from_json).keys() | list) | union(osd_ids_non_container.stdout_lines) | default([]) }}"
- name: ensure systemd service override directory exists - name: ensure systemd service override directory exists
file: file: