mon: do not create unnecessarily mgr keyrings

there's no need to generate mgr keyrings 'mgr.monX' when mgrs aren't
collocated with monitors.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
pull/3642/head
Guillaume Abrioux 2019-02-27 10:59:31 +01:00 committed by mergify[bot]
parent d327681b99
commit f68ad10bc9
1 changed files with 3 additions and 2 deletions

View File

@ -47,7 +47,8 @@
CEPH_CONTAINER_BINARY: "{{ container_binary }}" CEPH_CONTAINER_BINARY: "{{ container_binary }}"
with_items: with_items:
- "{{ groups.get(mgr_group_name, []) }}" # this honors the condition where mgrs run on separate machines - "{{ groups.get(mgr_group_name, []) }}" # this honors the condition where mgrs run on separate machines
- "{{ groups.get(mon_group_name, []) }}" # this honors the new rule where mgrs are always collocated with mons - "{{ groups.get(mon_group_name, []) if groups.get(mgr_group_name, []) | length == 0 else [] }}" # this honors the new rule where mgrs are always collocated with mons
run_once: True
delegate_to: "{{ groups[mon_group_name][0] }}" delegate_to: "{{ groups[mon_group_name][0] }}"
- name: copy ceph mgr key(s) to the ansible server - name: copy ceph mgr key(s) to the ansible server
@ -57,7 +58,7 @@
flat: yes flat: yes
with_items: with_items:
- "{{ groups.get(mgr_group_name, []) }}" # this honors the condition where mgrs run on separate machines - "{{ groups.get(mgr_group_name, []) }}" # this honors the condition where mgrs run on separate machines
- "{{ groups.get(mon_group_name, []) }}" # this honors the new rule where mgrs are always collocated with mons - "{{ groups.get(mon_group_name, []) if groups.get(mgr_group_name, []) | length == 0 else [] }}" # this honors the new rule where mgrs are always collocated with mons
delegate_to: "{{ groups[mon_group_name][0] }}" delegate_to: "{{ groups[mon_group_name][0] }}"
when: when:
- cephx - cephx