]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
validate: add a check for nfs standalone
authorGuillaume Abrioux <gabrioux@redhat.com>
Mon, 20 May 2019 14:28:42 +0000 (16:28 +0200)
committermergify[bot] <mergify[bot]@users.noreply.github.com>
Thu, 6 Jun 2019 12:44:37 +0000 (12:44 +0000)
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 003aeea45a8e232d2bd592c0dc866eb768e9d812)

roles/ceph-validate/tasks/check_nfs.yml [new file with mode: 0644]
roles/ceph-validate/tasks/main.yml

diff --git a/roles/ceph-validate/tasks/check_nfs.yml b/roles/ceph-validate/tasks/check_nfs.yml
new file mode 100644 (file)
index 0000000..1f78eb4
--- /dev/null
@@ -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)
index 30bf9969746894ec7bff9281cb13e92adfb5aa0c..bda480c9cb7a3912a89e7d17021de8e0149aa60b 100644 (file)
   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, [])