Merge pull request #1984 from jprovaznik/exportdir

Include exports dir in ceph-nfs config file
pull/2011/head
Sébastien Han 2017-10-06 22:38:13 +02:00 committed by GitHub
commit 5d39f378da
4 changed files with 29 additions and 0 deletions

View File

@ -36,6 +36,9 @@ dummy:
# NFS Ganesha Config #
######################
#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

@ -28,6 +28,9 @@ nfs_obj_gw: true
# NFS Ganesha Config #
######################
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
{