2018-04-11 23:15:29 +08:00
|
|
|
---
|
|
|
|
- name: copy rbd-mirror bootstrap key
|
|
|
|
copy:
|
2018-11-06 00:14:31 +08:00
|
|
|
src: "{{ fetch_directory }}/{{ fsid }}/var/lib/ceph/bootstrap-rbd-mirror/{{ cluster }}.keyring"
|
|
|
|
dest: "/var/lib/ceph/bootstrap-rbd-mirror/{{ cluster }}.keyring"
|
2018-04-11 23:15:29 +08:00
|
|
|
owner: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
|
|
|
group: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
2018-06-25 21:12:56 +08:00
|
|
|
mode: "{{ ceph_keyring_permissions }}"
|
2018-12-10 22:30:48 +08:00
|
|
|
|
|
|
|
- name: create rbd-mirror keyring
|
|
|
|
command: >
|
|
|
|
ceph --cluster {{ cluster }}
|
|
|
|
--name client.bootstrap-rbd-mirror
|
|
|
|
--keyring /var/lib/ceph/bootstrap-rbd-mirror/{{ cluster }}.keyring
|
|
|
|
auth get-or-create client.rbd-mirror.{{ ansible_hostname }}
|
|
|
|
mon 'profile rbd-mirror'
|
|
|
|
osd 'profile rbd'
|
|
|
|
-o /etc/ceph/{{ cluster }}.client.rbd-mirror.{{ ansible_hostname }}.keyring
|
|
|
|
args:
|
|
|
|
creates: /etc/ceph/{{ cluster }}.client.rbd-mirror.{{ ansible_hostname }}.keyring
|
2019-04-01 23:46:15 +08:00
|
|
|
when: not containerized_deployment
|
2018-12-10 22:30:48 +08:00
|
|
|
|
|
|
|
- name: set rbd-mirror key permissions
|
|
|
|
file:
|
|
|
|
path: /etc/ceph/{{ cluster }}.client.rbd-mirror.{{ ansible_hostname }}.keyring
|
|
|
|
owner: "ceph"
|
|
|
|
group: "ceph"
|
|
|
|
mode: "{{ ceph_keyring_permissions }}"
|
2019-04-01 23:46:15 +08:00
|
|
|
when: not containerized_deployment
|