Include exports dir in ceph-nfs config file

Exports dir is used when dynamic exports creation is enabled.
pull/1984/head
Jan Provaznik 2017-10-04 13:25:53 +02:00
parent f92eaea0fd
commit b8916ecbc1
4 changed files with 29 additions and 0 deletions

View File

@ -40,6 +40,9 @@ dummy:
#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 #

View File

@ -32,6 +32,9 @@ ceph_nfs_pseudo_path: "/cephfile"
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 #

View File

@ -19,6 +19,25 @@
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:

View File

@ -1,6 +1,10 @@
#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
{