From 8d26299116974a0a2fa6b5885629d1e63ff66701 Mon Sep 17 00:00:00 2001 From: Dimitri Savineau Date: Mon, 9 Sep 2019 14:33:55 -0400 Subject: [PATCH] rbd-mirror: Allow to copy the admin keyring The ceph-rbd-mirror role allows to copy the admin keyring via the copy_admin_key variable but there's actually no task in that role doing the job. Signed-off-by: Dimitri Savineau (cherry picked from commit 1f505628dd5e62226ceee975679f1629788771f9) --- roles/ceph-rbd-mirror/tasks/common.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/roles/ceph-rbd-mirror/tasks/common.yml b/roles/ceph-rbd-mirror/tasks/common.yml index a679bdbae..ccbbd8180 100644 --- a/roles/ceph-rbd-mirror/tasks/common.yml +++ b/roles/ceph-rbd-mirror/tasks/common.yml @@ -7,6 +7,15 @@ group: "{{ ceph_uid if containerized_deployment else 'ceph' }}" mode: "{{ ceph_keyring_permissions }}" +- name: copy ceph admin keyring if needed + copy: + src: "{{ fetch_directory }}/{{ fsid }}/etc/ceph/{{ cluster }}.client.admin.keyring" + dest: "/etc/ceph/{{ cluster }}.client.admin.keyring" + owner: "{{ ceph_uid if containerized_deployment else 'ceph' }}" + group: "{{ ceph_uid if containerized_deployment else 'ceph' }}" + mode: "{{ ceph_keyring_permissions }}" + when: copy_admin_key | bool + - name: create rbd-mirror keyring command: > ceph --cluster {{ cluster }}