roles/fileserver: Deploy Samba file server
The *fileserver* role configures Samba as a file sharing server. It uses the *samba* role to handle cross-distribution installation of Samba itself, and is focused primarily on configuring shared folders.
This commit is contained in:
17
roles/fileserver/templates/shares.conf.j2
Normal file
17
roles/fileserver/templates/shares.conf.j2
Normal file
@@ -0,0 +1,17 @@
|
||||
{% macro yesno(value) %}{{ 'Yes' if value|bool else 'No' }}{% endmacro %}
|
||||
{% for share in samba_shares %}
|
||||
|
||||
[{{ share.name }}]
|
||||
{% if share.path is defined %}
|
||||
path = {{ share.path }}
|
||||
{% endif %}
|
||||
{% if share.browseable is defined %}
|
||||
browseable = {{ yesno(share.browseable) }}
|
||||
{% endif %}
|
||||
{% if share.writable is defined %}
|
||||
writable = {{ yesno(share.writable) }}
|
||||
{% endif %}
|
||||
{% if share.guest_ok is defined %}
|
||||
guest ok = {{ yesno(share.guest_ok) }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
Reference in New Issue
Block a user