2016-04-04 06:35:09 +08:00
|
|
|
---
|
|
|
|
- name: install dependencies
|
|
|
|
# XXX Determine what RH repository this will belong to so that it can be
|
|
|
|
# properly checked and errored if the repository is not enabled.
|
2016-11-28 22:16:56 +08:00
|
|
|
package:
|
2016-04-04 06:35:09 +08:00
|
|
|
name: rbd-mirror
|
|
|
|
state: present
|
2018-12-19 21:55:01 +08:00
|
|
|
register: result
|
|
|
|
until: result is succeeded
|
2016-04-04 06:35:09 +08:00
|
|
|
tags:
|
|
|
|
- package-install
|
|
|
|
|
2017-06-24 02:54:50 +08:00
|
|
|
- name: create rbd-mirror keyring
|
2018-11-06 00:14:31 +08:00
|
|
|
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
|
2017-06-24 02:54:50 +08:00
|
|
|
args:
|
2017-09-08 15:51:03 +08:00
|
|
|
creates: /etc/ceph/{{ cluster }}.client.rbd-mirror.{{ ansible_hostname }}.keyring
|
2017-06-24 02:54:50 +08:00
|
|
|
changed_when: false
|
|
|
|
when:
|
|
|
|
- cephx
|
|
|
|
|
|
|
|
- name: set rbd-mirror key permissions
|
|
|
|
file:
|
|
|
|
path: /etc/ceph/{{ cluster }}.client.rbd-mirror.{{ ansible_hostname }}.keyring
|
|
|
|
owner: "ceph"
|
|
|
|
group: "ceph"
|
2018-06-25 21:12:56 +08:00
|
|
|
mode: "{{ ceph_keyring_permissions }}"
|
2017-06-24 02:54:50 +08:00
|
|
|
when:
|
2018-10-11 03:24:22 +08:00
|
|
|
- cephx
|