summaryrefslogtreecommitdiffstats
path: root/ansible/node/roles/nas/templates/samba_registry.j2
diff options
context:
space:
mode:
Diffstat (limited to 'ansible/node/roles/nas/templates/samba_registry.j2')
-rw-r--r--ansible/node/roles/nas/templates/samba_registry.j233
1 files changed, 33 insertions, 0 deletions
diff --git a/ansible/node/roles/nas/templates/samba_registry.j2 b/ansible/node/roles/nas/templates/samba_registry.j2
new file mode 100644
index 0000000..f6200af
--- /dev/null
+++ b/ansible/node/roles/nas/templates/samba_registry.j2
@@ -0,0 +1,33 @@
+[global]
+{% if auth_method == 'winbind' %}
+ security = ADS
+{% elif auth_method == 'files' %}
+ security = USER
+{% else %}
+ security = BROKEN
+{% endif %}
+
+ logging = syslog
+ log level = 1
+
+ netbios name = {{ cluster }}
+ workgroup = {{ samba.workgroup }}
+ realm = {{ resolv_conf.domain }}
+
+ disable netbios = yes
+ disable spoolss = yes
+
+ idmap config * : backend = autorid
+ idmap config * : range = 1000000-1999999
+
+ kernel oplocks = yes
+
+ read only = no
+
+{% for s in shares %}
+[{{ s.name }}]
+ path = {{ s.directory }}
+ comment = Example share {{ s.name }}
+ guest ok = yes
+ browseable = yes
+{% endfor %}