ceph-validate: add rbdmirror validation

When ceph_rbd_mirror_configure is set to true we need to ensure that
the required variables aren't empty.

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

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 4a065cebd7)
pull/4727/head
Dimitri Savineau 2019-11-05 11:53:22 -05:00 committed by Guillaume Abrioux
parent 2436044369
commit 255be99bc5
2 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,15 @@
---
- name: ensure ceph_rbd_mirror_pool is set
fail:
msg: "ceph_rbd_mirror_pool needs to be provided"
when: ceph_rbd_mirror_pool | default("") | length == 0
- name: ensure ceph_rbd_mirror_remote_cluster is set
fail:
msg: "ceph_rbd_mirror_remote_cluster needs to be provided"
when: ceph_rbd_mirror_remote_cluster | default("") | length == 0
- name: ensure ceph_rbd_mirror_remote_user is set
fail:
msg: "ceph_rbd_mirror_remote_user needs to be provided"
when: ceph_rbd_mirror_remote_user | default("") | length == 0

View File

@ -208,3 +208,9 @@
when:
- radosgw_frontend_type == 'civetweb'
- radosgw_civetweb_num_threads is defined
- name: include check_rbdmirror.yml
include_tasks: check_rbdmirror.yml
when:
- rbdmirror_group_name in group_names
- ceph_rbd_mirror_configure | default(false) | bool