mirror of https://github.com/ceph/ceph-ansible.git
33 lines
1007 B
YAML
33 lines
1007 B
YAML
---
|
|
- 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.
|
|
package:
|
|
name: rbd-mirror
|
|
state: present
|
|
tags:
|
|
- package-install
|
|
|
|
- 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
|
|
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"
|
|
mode: "{{ ceph_keyring_permissions }}"
|
|
when:
|
|
- cephx |