From: Sébastien Han Date: Mon, 5 Nov 2018 16:14:31 +0000 (+0100) Subject: rbd-mirror: use the new rbd-mirror key X-Git-Tag: v4.0.0beta1~251 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=cdee9f01194eff27e6b6bf66ab436cecdd482dcb;p=ceph-ansible.git rbd-mirror: use the new rbd-mirror key Instead of using the old rbd key let's use the new rbr-mirror key to bootstrap the rbd -mirror daemon. Signed-off-by: Sébastien Han --- diff --git a/roles/ceph-mon/tasks/docker/copy_configs.yml b/roles/ceph-mon/tasks/docker/copy_configs.yml index 304d04371..f5a5fa917 100644 --- a/roles/ceph-mon/tasks/docker/copy_configs.yml +++ b/roles/ceph-mon/tasks/docker/copy_configs.yml @@ -8,6 +8,7 @@ - /var/lib/ceph/bootstrap-rgw/{{ cluster }}.keyring - /var/lib/ceph/bootstrap-mds/{{ cluster }}.keyring - /var/lib/ceph/bootstrap-rbd/{{ cluster }}.keyring + - /var/lib/ceph/bootstrap-rbd-mirror/{{ cluster }}.keyring - name: stat for ceph config and keys stat: diff --git a/roles/ceph-rbd-mirror/tasks/common.yml b/roles/ceph-rbd-mirror/tasks/common.yml index 3750e2d06..ca168ab19 100644 --- a/roles/ceph-rbd-mirror/tasks/common.yml +++ b/roles/ceph-rbd-mirror/tasks/common.yml @@ -1,8 +1,8 @@ --- - name: copy rbd-mirror bootstrap key copy: - src: "{{ fetch_directory }}/{{ fsid }}/var/lib/ceph/bootstrap-rbd/{{ cluster }}.keyring" - dest: "/var/lib/ceph/bootstrap-rbd/{{ cluster }}.keyring" + src: "{{ fetch_directory }}/{{ fsid }}/var/lib/ceph/bootstrap-rbd-mirror/{{ cluster }}.keyring" + dest: "/var/lib/ceph/bootstrap-rbd-mirror/{{ cluster }}.keyring" owner: "{{ ceph_uid if containerized_deployment else 'ceph' }}" group: "{{ ceph_uid if containerized_deployment else 'ceph' }}" mode: "{{ ceph_keyring_permissions }}" diff --git a/roles/ceph-rbd-mirror/tasks/pre_requisite.yml b/roles/ceph-rbd-mirror/tasks/pre_requisite.yml index 29f917b89..5a0486a72 100644 --- a/roles/ceph-rbd-mirror/tasks/pre_requisite.yml +++ b/roles/ceph-rbd-mirror/tasks/pre_requisite.yml @@ -9,7 +9,13 @@ - package-install - name: create rbd-mirror keyring - command: ceph --cluster {{ cluster }} --name client.bootstrap-rbd --keyring /var/lib/ceph/bootstrap-rbd/{{ cluster }}.keyring auth get-or-create client.rbd-mirror.{{ ansible_hostname }} mon 'profile rbd' osd 'profile rbd' -o /etc/ceph/{{ cluster }}.client.rbd-mirror.{{ ansible_hostname }}.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' 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