]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
rbd-mirror: Allow to copy the admin keyring
authorDimitri Savineau <dsavinea@redhat.com>
Mon, 9 Sep 2019 18:33:55 +0000 (14:33 -0400)
committerDimitri Savineau <savineau.dimitri@gmail.com>
Wed, 11 Sep 2019 15:48:48 +0000 (11:48 -0400)
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 <dsavinea@redhat.com>
(cherry picked from commit 1f505628dd5e62226ceee975679f1629788771f9)

roles/ceph-rbd-mirror/tasks/common.yml

index a679bdbae757a6ca7d8a844bbe7e48e8d5b1ac63..ccbbd8180f9550efcd27a8d19024848481172d41 100644 (file)
@@ -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 }}