2016-05-06 02:20:03 +08:00
|
|
|
#jinja2: trim_blocks: "true", lstrip_blocks: "true"
|
|
|
|
# {{ ansible_managed }}
|
|
|
|
|
2017-11-15 19:59:36 +08:00
|
|
|
{% if ceph_nfs_dynamic_exports and not ceph_nfs_rados_backend %}
|
2017-10-04 19:25:53 +08:00
|
|
|
%include /etc/ganesha/export.d/INDEX.conf
|
|
|
|
{% endif %}
|
|
|
|
|
2017-10-16 18:06:59 +08:00
|
|
|
NFS_Core_Param
|
|
|
|
{
|
|
|
|
{% if ceph_nfs_bind_addr is defined %}
|
|
|
|
Bind_Addr={{ ceph_nfs_bind_addr }};
|
|
|
|
{% endif %}
|
|
|
|
}
|
|
|
|
|
2018-04-09 20:03:33 +08:00
|
|
|
{% if ceph_nfs_disable_caching or nfs_file_gw %}
|
2018-05-03 20:10:13 +08:00
|
|
|
EXPORT_DEFAULTS {
|
|
|
|
Attr_Expiration_Time = 0;
|
|
|
|
}
|
|
|
|
|
2018-04-09 20:03:33 +08:00
|
|
|
CACHEINODE {
|
|
|
|
Dir_Max = 1;
|
|
|
|
Dir_Chunk = 0;
|
|
|
|
|
|
|
|
Cache_FDs = false;
|
|
|
|
|
|
|
|
NParts = 1;
|
|
|
|
Cache_Size = 1;
|
|
|
|
}
|
|
|
|
{% endif %}
|
|
|
|
|
2017-11-15 19:59:36 +08:00
|
|
|
{% if ceph_nfs_rados_backend %}
|
|
|
|
RADOS_URLS {
|
|
|
|
ceph_conf = '/etc/ceph/{{ cluster }}.conf';
|
|
|
|
userid = "{{ ceph_nfs_ceph_user }}";
|
|
|
|
}
|
|
|
|
%url rados://{{ cephfs_data }}/{{ ceph_nfs_rados_export_index }}
|
|
|
|
|
|
|
|
NFSv4 {
|
|
|
|
RecoveryBackend = 'rados_kv';
|
|
|
|
}
|
|
|
|
RADOS_KV {
|
|
|
|
ceph_conf = '/etc/ceph/{{ cluster }}.conf';
|
|
|
|
userid = "{{ ceph_nfs_ceph_user }}";
|
|
|
|
pool = "{{ cephfs_data }}";
|
|
|
|
}
|
|
|
|
{% endif %}
|
2017-10-16 18:06:59 +08:00
|
|
|
|
2016-08-18 20:24:48 +08:00
|
|
|
{% if nfs_file_gw %}
|
2016-05-06 02:20:03 +08:00
|
|
|
EXPORT
|
|
|
|
{
|
2017-09-20 00:45:24 +08:00
|
|
|
Export_id={{ ceph_nfs_ceph_export_id }};
|
2016-05-06 02:20:03 +08:00
|
|
|
|
|
|
|
Path = "/";
|
|
|
|
|
2016-07-21 21:17:19 +08:00
|
|
|
Pseudo = {{ ceph_nfs_ceph_pseudo_path }};
|
2016-05-06 02:20:03 +08:00
|
|
|
|
2016-07-21 21:17:19 +08:00
|
|
|
Access_Type = {{ ceph_nfs_ceph_access_type }};
|
2016-05-06 02:20:03 +08:00
|
|
|
|
2017-09-03 23:32:44 +08:00
|
|
|
Protocols = {{ ceph_nfs_ceph_protocols }};
|
2016-05-06 02:20:03 +08:00
|
|
|
|
2017-09-03 23:32:44 +08:00
|
|
|
Transports = TCP;
|
2016-05-06 02:20:03 +08:00
|
|
|
|
2017-09-20 00:45:24 +08:00
|
|
|
SecType = sys,krb5,krb5i,krb5p;
|
2016-05-06 02:20:03 +08:00
|
|
|
|
2018-04-09 20:03:33 +08:00
|
|
|
Attr_Expiration_Time = 0;
|
|
|
|
|
2016-05-06 02:20:03 +08:00
|
|
|
FSAL {
|
|
|
|
Name = CEPH;
|
2017-09-15 23:38:19 +08:00
|
|
|
User_Id = "{{ ceph_nfs_ceph_user }}";
|
2016-05-06 02:20:03 +08:00
|
|
|
}
|
2017-09-03 23:32:44 +08:00
|
|
|
|
|
|
|
{{ ganesha_ceph_export_overrides | default(None) }}
|
2016-05-06 02:20:03 +08:00
|
|
|
}
|
2016-07-21 21:17:19 +08:00
|
|
|
{% endif %}
|
2016-08-18 20:24:48 +08:00
|
|
|
{% if nfs_obj_gw %}
|
2016-07-21 21:17:19 +08:00
|
|
|
EXPORT
|
|
|
|
{
|
2017-09-20 00:45:24 +08:00
|
|
|
Export_id={{ ceph_nfs_rgw_export_id }};
|
2016-07-21 21:17:19 +08:00
|
|
|
|
|
|
|
Path = "/";
|
|
|
|
|
|
|
|
Pseudo = {{ ceph_nfs_rgw_pseudo_path }};
|
|
|
|
|
|
|
|
Access_Type = {{ ceph_nfs_rgw_access_type }};
|
|
|
|
|
2017-09-03 23:32:44 +08:00
|
|
|
Protocols = {{ ceph_nfs_rgw_protocols }};
|
2016-07-21 21:17:19 +08:00
|
|
|
|
2017-09-03 23:32:44 +08:00
|
|
|
Transports = TCP;
|
2016-07-21 21:17:19 +08:00
|
|
|
|
2017-09-20 00:45:24 +08:00
|
|
|
SecType = sys,krb5,krb5i,krb5p;
|
2016-07-21 21:17:19 +08:00
|
|
|
|
|
|
|
FSAL {
|
|
|
|
Name = RGW;
|
|
|
|
User_Id = "{{ ceph_nfs_rgw_user }}";
|
|
|
|
Access_Key_Id ="{{ ceph_nfs_rgw_access_key }}";
|
|
|
|
Secret_Access_Key = "{{ ceph_nfs_rgw_secret_key }}";
|
|
|
|
}
|
2017-09-03 23:32:44 +08:00
|
|
|
|
|
|
|
{{ ganesha_rgw_export_overrides | default(None) }}
|
|
|
|
|
2016-07-21 21:17:19 +08:00
|
|
|
}
|
2017-09-11 11:34:36 +08:00
|
|
|
|
|
|
|
RGW {
|
|
|
|
ceph_conf = "/etc/ceph/{{ cluster }}.conf";
|
|
|
|
cluster = "{{ cluster }}";
|
|
|
|
name = "{{ rgw_client_name }}";
|
|
|
|
{{ ganesha_rgw_section_overrides | default(None) }}
|
|
|
|
}
|
2016-07-21 21:17:19 +08:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
LOG {
|
|
|
|
Facility {
|
|
|
|
name = FILE;
|
|
|
|
destination = "{{ ceph_nfs_log_file }}";
|
|
|
|
enable = active;
|
|
|
|
}
|
2017-09-03 23:32:44 +08:00
|
|
|
|
|
|
|
{{ ganesha_log_overrides | default(None) }}
|
2016-07-21 21:17:19 +08:00
|
|
|
}
|
2017-09-03 23:32:44 +08:00
|
|
|
|
|
|
|
{{ ganesha_conf_overrides | default(None) }}
|