# 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
+#ceph_nfs_dynamic_exports: false
####################
# FSAL Ceph Config #
# 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
+ceph_nfs_dynamic_exports: false
####################
# FSAL Ceph Config #
when:
- ansible_os_family == 'RedHat'
- sestatus.stdout != 'Disabled'
+
+- name: create dbus service file
+ become: true
+ template:
+ src: "{{ role_path }}/templates/org.ganesha.nfsd.conf"
+ dest: /etc/dbus-1/system.d/org.ganesha.nfsd.conf
+ owner: "root"
+ group: "root"
+ mode: "0644"
+ when:
+ - ceph_nfs_dynamic_exports
+
+- name: reload dbus configuration
+ command: "killall -SIGHUP dbus-daemon"
+ when:
+ - ceph_nfs_dynamic_exports
owner: "root"
group: "root"
mode: "0755"
- when: ceph_nfs_include_exports_dir
+ when: ceph_nfs_dynamic_exports
- name: create exports dir index file
copy:
owner: "root"
group: "root"
mode: "0644"
- when: ceph_nfs_include_exports_dir
+ when: ceph_nfs_dynamic_exports
- name: generate systemd unit file
become: true
-v /etc/ceph:/etc/ceph \
-v /var/lib/nfs/ganesha:/var/lib/nfs/ganesha \
-v /etc/ganesha:/etc/ganesha \
+ {% if ceph_nfs_dynamic_exports %}
+ --privileged \
+ -v /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket \
+ {% endif -%}
{% else -%}
-e KV_TYPE={{kv_type}} \
-e KV_IP={{kv_endpoint}}\
#jinja2: trim_blocks: "true", lstrip_blocks: "true"
# {{ ansible_managed }}
-{% if ceph_nfs_include_exports_dir %}
+{% if ceph_nfs_dynamic_exports %}
%include /etc/ganesha/export.d/INDEX.conf
{% endif %}