homeserver/roles/mgrote_fileserver_smb/templates/smb.conf.j2

65 lines
2.8 KiB
Text
Raw Permalink Normal View History

{{ file_header | default () }}
{% if smb_global_options is defined %}
2020-08-18 11:57:53 +02:00
#======================= Global Settings =======================
{% for item in smb_global_options %}
{{ item.option }} = {{ item.value }}
{% endfor %}
{% endif %}
2020-08-18 11:57:53 +02:00
{% if smb_enable_snapshots_dir is sameas true and smb_enable_snapshots_shadow is sameas false %}
##======================= catia =======================
vfs objects = catia
catia: mappings = {{ smb_catia_mappings }}
{% elif smb_enable_snapshots_dir is sameas false and smb_enable_snapshots_shadow is sameas true %}
##======================= shadow_copy2 =======================
vfs objects = shadow_copy2
shadow: snapdir = {{ smb_shadow_snapdir }}
shadow: sort = {{ smb_shadow_sort }}
shadow: format = {{ smb_shadow_format }}
shadow: snapprefix = {{ smb_shadow_snapprefix }}
shadow: delimiter = {{ smb_shadow_delimiter }}
shadow: localtime = {{ smb_shadow_localtime }}
shadow: snapdirseverywhere = yes
{% elif smb_enable_snapshots_shadow is sameas true and smb_enable_snapshots_dir is sameas true %}
#======================= vfs objects =======================
vfs objects = shadow_copy2, catia
##======================= catia =======================
catia:mappings = {{ smb_catia_mappings }}
##======================= shadow_copy2 =======================
shadow: snapdir = {{ smb_shadow_snapdir }}
shadow: sort = {{ smb_shadow_sort }}
shadow: format = {{ smb_shadow_format }}
shadow: snapprefix = {{ smb_shadow_snapprefix }}
shadow: delimiter = {{ smb_shadow_delimiter }}
shadow: localtime = {{ smb_shadow_localtime }}
shadow: snapdirseverywhere = yes
{% endif %}
2020-08-18 11:57:53 +02:00
#======================= Share Definitions =======================
2021-02-20 15:58:23 +01:00
{% for item in smb_shares %}
2020-08-18 11:57:53 +02:00
2021-02-20 15:58:23 +01:00
[{{ item.name }}]
path = {{ item.path }}
guest ok = {{ item.guest_ok | default('no') }}
read only = {{ item.read_only | default('no') }}
browseable = {{ item.browseable | default('yes') }}
inherit acls = {{ item.inherit_acls | default('yes') }}
inherit permissions = {{ item.inherit_permissions | default('no') }}
ea support = {{ item.ea_support | default('no') }}
store dos attributes = {{ item.store_dos_attributes | default('no') }}
printable = {{ item.printable | default('no') }}
create mask = {{ item.create_mask | default('0664') }}
force create mode = {{ item.force_create_mode | default('0664') }}
directory mask = {{ item.directory_mask | default('0775') }}
force directory mode = {{ item.force_directory_mode | default('0775') }}
hide special files = {{ item.hide_special_files | default('yes') }}
follow symlinks = {{ item.follow_symlinks | default('yes') }}
hide dot files = {{ item.hide_dot_files | default('no') }}
valid users = {{ item.users_ro }} {{ item.users_rw }}
invalid users =
read list = {{ item.users_ro }}
write list = {{ item.users_rw }}
2020-08-18 11:57:53 +02:00
{% endfor %}