]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
rbd-mirror: fix keyring setup
authorGuillaume Abrioux <gabrioux@redhat.com>
Mon, 12 Sep 2022 11:39:14 +0000 (13:39 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Mon, 12 Sep 2022 12:22:13 +0000 (14:22 +0200)
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>
roles/ceph-rbd-mirror/tasks/configure_mirroring.yml

index 6a0fae923ec2efcdd6862662ca4b44430ea1a5f6..ac664f6c38d09b8333803d3292ae6bee6e078a38 100644 (file)
             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