rbd-mirror: fix keyring setup

This task doesn't setup a proper keyring.
This task wasn't backported because it relies on a feature of the `ceph_key` module that wasn't
available in the branch `rhcs-4.3`.

Given that this feature is now backported, let's use it.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2037646

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
pull/7347/head
Guillaume Abrioux 2022-09-12 13:39:14 +02:00
parent c1dd0a6cbe
commit 0b82f0bd29
1 changed files with 8 additions and 1 deletions

View File

@ -54,7 +54,14 @@
secret: "{{ ceph_rbd_mirror_local_user_secret | default('') }}" }
- name: get "client.rbd-mirror.{{ ansible_facts['hostname'] }}" from ceph monitor
command: "{{ hostvars[groups[mon_group_name][0]]['container_exec_cmd'] | default('') }} ceph --cluster {{ cluster }} auth print-key client.bootstrap-rbd-mirror"
ceph_key:
name: "client.rbd-mirror.{{ ansible_facts['hostname'] }}"
cluster: "{{ cluster }}"
output_format: plain
state: info
environment:
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment | bool else None }}"
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
register: _rbd_mirror_key
delegate_to: "{{ groups.get(mon_group_name)[0] }}"
run_once: true