Exports dir is used when dynamic exports creation is enabled.
#ceph_nfs_protocols: "3,4"
#ceph_nfs_access_type: "RW"
#ceph_nfs_log_file: "/var/log/ganesha/ganesha.log"
+# whether ganesha config file should include additional
+# sub-directory with exports definitions, this is useful for dynamic exports
+#ceph_nfs_include_exports_dir: false
####################
# FSAL Ceph Config #
ceph_nfs_protocols: "3,4"
ceph_nfs_access_type: "RW"
ceph_nfs_log_file: "/var/log/ganesha/ganesha.log"
+# whether ganesha config file should include additional
+# sub-directory with exports definitions, this is useful for dynamic exports
+ceph_nfs_include_exports_dir: false
####################
# FSAL Ceph Config #
notify:
- restart ceph nfss
+- name: create exports directory
+ file:
+ path: /etc/ganesha/export.d
+ state: directory
+ owner: "root"
+ group: "root"
+ mode: "0755"
+ when: ceph_nfs_include_exports_dir
+
+- name: create exports dir index file
+ copy:
+ content: ""
+ force: no
+ dest: /etc/ganesha/export.d/INDEX.conf
+ owner: "root"
+ group: "root"
+ mode: "0644"
+ when: ceph_nfs_include_exports_dir
+
- name: generate systemd unit file
become: true
template:
#jinja2: trim_blocks: "true", lstrip_blocks: "true"
# {{ ansible_managed }}
+{% if ceph_nfs_include_exports_dir %}
+%include /etc/ganesha/export.d/INDEX.conf
+{% endif %}
+
{% if nfs_file_gw %}
EXPORT
{