mirror of https://github.com/ceph/ceph-ansible.git
ceph-crash: Only deploy key to targeted hosts
The current task installs the ceph-crash key to "most" hosts via
"delegate_to". This key is only used by the ceph-crash daemon and should
just be installed on all hosts targeted by this role. There is no need
for using a delegated task.
Signed-off-by: Gaudenz Steinlin <gaudenz.steinlin@cloudscale.ch>
(cherry picked from commit 68cc93fb18
)
pull/5957/head
parent
540c497ec6
commit
950ad22f72
|
@ -23,20 +23,10 @@
|
||||||
command: "{{ hostvars[groups[mon_group_name][0]]['container_exec_cmd'] | default('') }} ceph --cluster {{ cluster }} auth get client.crash"
|
command: "{{ hostvars[groups[mon_group_name][0]]['container_exec_cmd'] | default('') }} ceph --cluster {{ cluster }} auth get client.crash"
|
||||||
register: _crash_keys
|
register: _crash_keys
|
||||||
delegate_to: "{{ groups.get(mon_group_name)[0] }}"
|
delegate_to: "{{ groups.get(mon_group_name)[0] }}"
|
||||||
|
check_mode: False
|
||||||
|
changed_when: False
|
||||||
run_once: true
|
run_once: true
|
||||||
|
|
||||||
- name: get a list of node where the keyring should be copied
|
|
||||||
set_fact:
|
|
||||||
list_target_node: "{{ list_target_node | default([]) | union(((groups.get('all') | difference(groups.get(grafana_server_group_name, []) + groups.get(client_group_name, []) + groups.get(nfs_group_name, []) + groups.get(iscsi_gw_group_name, []))) + groups.get(item, [])) | unique) }}"
|
|
||||||
run_once: True
|
|
||||||
with_items:
|
|
||||||
- "{{ mon_group_name if groups.get(mon_group_name, []) | length > 0 else [] }}"
|
|
||||||
- "{{ osd_group_name if groups.get(osd_group_name, []) | length > 0 else [] }}"
|
|
||||||
- "{{ mds_group_name if groups.get(mds_group_name, []) | length > 0 else [] }}"
|
|
||||||
- "{{ rgw_group_name if groups.get(rgw_group_name, []) | length > 0 else [] }}"
|
|
||||||
- "{{ rbdmirror_group_name if groups.get(rbdmirror_group_name, []) | length > 0 else [] }}"
|
|
||||||
- "{{ mgr_group_name if groups.get(mgr_group_name, []) | length > 0 else [] }}"
|
|
||||||
|
|
||||||
- name: copy ceph key(s) if needed
|
- name: copy ceph key(s) if needed
|
||||||
copy:
|
copy:
|
||||||
dest: "{{ ceph_conf_key_directory }}/{{ cluster }}.client.crash.keyring"
|
dest: "{{ ceph_conf_key_directory }}/{{ cluster }}.client.crash.keyring"
|
||||||
|
@ -44,10 +34,6 @@
|
||||||
owner: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
owner: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
||||||
group: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
group: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
||||||
mode: "{{ ceph_keyring_permissions }}"
|
mode: "{{ ceph_keyring_permissions }}"
|
||||||
with_items: "{{ list_target_node }}"
|
|
||||||
delegate_to: "{{ item }}"
|
|
||||||
run_once: True
|
|
||||||
when: _crash_keys is not skipped
|
|
||||||
|
|
||||||
- name: start ceph-crash daemon
|
- name: start ceph-crash daemon
|
||||||
when: containerized_deployment | bool
|
when: containerized_deployment | bool
|
||||||
|
|
Loading…
Reference in New Issue