]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commit
rbd-mirror: fail if the peer is not added
authorDimitri Savineau <dsavinea@redhat.com>
Tue, 15 Oct 2019 15:32:40 +0000 (11:32 -0400)
committerGuillaume Abrioux <gabrioux@redhat.com>
Wed, 16 Oct 2019 14:27:46 +0000 (16:27 +0200)
commit0b1e9c0737ca84c2e4a34f827cf91e1a11007b16
treed6ff0d50b268a16de2c3196cfad3e41288ac25f4
parentbc701860d541b9f752d0f8cfcbed43979aafb70e
rbd-mirror: fail if the peer is not added

Due the 'failed_when: false' statement present in the peer task then
the playbook continues to ran even if the peer task was failing (like
incorrect remote peer format.

"stderr": "rbd: invalid spec 'admin@cluster1'"

This patch adds a task to list the peer present and add the peer only if
it's not already added. With this we don't need the failed_when statement
anymore.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1665877
Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
roles/ceph-rbd-mirror/tasks/configure_mirroring.yml