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 <dsavinea@redhat.com>
(cherry picked from commit 1f505628dd)
pull/4455/head
Dimitri Savineau 2019-09-09 14:33:55 -04:00 committed by Dimitri Savineau
parent 142ac88961
commit 8d26299116
1 changed files with 9 additions and 0 deletions

View File

@ -7,6 +7,15 @@
group: "{{ ceph_uid if containerized_deployment else 'ceph' }}" group: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
mode: "{{ ceph_keyring_permissions }}" 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 - name: create rbd-mirror keyring
command: > command: >
ceph --cluster {{ cluster }} ceph --cluster {{ cluster }}