Skip to content
This repository has been archived by the owner on Nov 2, 2022. It is now read-only.

Add prefix option for vfs_objects #80

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,24 @@ samba_shares:
group: tomcat
```

This is an example of configuring the shadow copy vfs object module for sharing a ZFS dataset. This will allow Windows clients to use the `Previous Versions` tab in the share's properties.

```Yaml
samba_shares:
- name: ISO
path: /mnt/Tank/ISO
vfs_objects:
- name: shadow_copy2
prefix: shadow
options:
- name: snapdir
value: .zfs/snapshot
- name: sort
value: desc
- name: format
value: auto-%Y-%m-%d_%H-%M
```

A complete overview of share options follows below. Only `name` is required, the rest is optional.

| Option | Default | Comment |
Expand Down
2 changes: 1 addition & 1 deletion templates/smb.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
{% if obj.options is defined %}
{% if obj.options|length > 0 %}
{% for opt in obj.options %}
{{ obj.name }}:{{ opt.name }} = {{ opt.value }}
{{ obj.prefix | default(obj.name) }}:{{ opt.name }} = {{ opt.value }}
{% endfor %}
{% endif %}
{% endif %}
Expand Down