From: Dimitri Savineau Date: Wed, 14 Oct 2020 00:43:53 +0000 (-0400) Subject: ceph-osd: don't start the OSD services twice X-Git-Tag: v5.0.3~53 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=3f610811febafca47e82b8979a375b2e74954b51;p=ceph-ansible.git 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 (cherry picked from commit 4eaa65c36256189b352c88c1058e888550adbd0f) --- diff --git a/roles/ceph-osd/tasks/start_osds.yml b/roles/ceph-osd/tasks/start_osds.yml index 37a44db95..b0466a4d2 100644 --- a/roles/ceph-osd/tasks/start_osds.yml +++ b/roles/ceph-osd/tasks/start_osds.yml @@ -40,7 +40,7 @@ enabled: yes masked: no 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 file: