validate: add a check for nfs standalone

if `nfs_obj_gw` is True when deploying an internal ganesha with an
external ceph cluster, `ceph_nfs_rgw_access_key` and
`ceph_nfs_rgw_secret_key` must be provided so the
ganesha configuration file can be generated.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 003aeea45a)
pull/4054/head
Guillaume Abrioux 2019-05-20 16:28:42 +02:00 committed by mergify[bot]
parent cb125fa4c8
commit 6449d8fd56
2 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,8 @@
---
- name: fail if ceph_nfs_rgw_access_key or ceph_nfs_rgw_secret_key are undefined (nfs standalone)
fail:
msg: "ceph_nfs_rgw_access_key and ceph_nfs_rgw_secret_key must be set if nfs_obj_gw is True"
when:
- nfs_obj_gw
- groups.get(mon_group_name, []) | length == 0
- (ceph_nfs_rgw_access_key is undefined or ceph_nfs_rgw_secret_key is undefined)

View File

@ -101,3 +101,7 @@
when:
- radosgw_frontend_type == 'civetweb'
- radosgw_civetweb_num_threads is defined
- name: include check_nfs.yml
include_tasks: check_nfs.yml
when: inventory_hostname in groups.get(nfs_group_name, [])