2015-03-13 20:55:33 +00:00
|
|
|
# Samba configuration -- Managed by Ansible, please don't edit manually
|
|
|
|
# vim: ft=samba
|
|
|
|
#
|
|
|
|
# {{ ansible_managed }}
|
|
|
|
|
|
|
|
[global]
|
|
|
|
# Server information
|
2015-11-05 14:14:12 +00:00
|
|
|
netbios name = {% if samba_netbios_name is defined %}{{ samba_netbios_name }}{% else %}{{ ansible_hostname }}{% endif %}
|
|
|
|
|
2015-03-13 20:55:33 +00:00
|
|
|
workgroup = {{ samba_workgroup }}
|
|
|
|
server string = {{ samba_server_string }}
|
|
|
|
|
|
|
|
# Logging
|
|
|
|
{% if samba_log is defined %}
|
|
|
|
log file = {{ samba_log }}
|
|
|
|
max log size = {{ samba_log_size }}
|
|
|
|
{% else %}
|
|
|
|
syslog only = yes
|
|
|
|
syslog = 1
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
# Authentication
|
|
|
|
security = {{ samba_security }}
|
|
|
|
passdb backend = {{ samba_passdb_backend }}
|
|
|
|
map to guest = {{ samba_map_to_guest }}
|
|
|
|
|
|
|
|
# Name resolution: make sure \\NETBIOS_NAME\ works
|
|
|
|
wins support = yes
|
|
|
|
local master = yes
|
|
|
|
domain master = yes
|
|
|
|
preferred master = yes
|
|
|
|
|
2015-11-05 09:44:05 +00:00
|
|
|
{% if not samba_load_printers %}
|
2015-03-13 20:55:33 +00:00
|
|
|
# Don't load printers
|
|
|
|
load printers = no
|
|
|
|
printing = bsd
|
|
|
|
printcap name = /dev/null
|
|
|
|
disable spoolss = yes
|
|
|
|
{% endif %}
|
|
|
|
|
2015-11-05 09:44:05 +00:00
|
|
|
{% if samba_load_homes %}
|
2015-03-13 20:55:33 +00:00
|
|
|
## Make home directories accessible
|
|
|
|
[homes]
|
|
|
|
comment = Home Directories
|
|
|
|
browseable = no
|
|
|
|
writable = yes
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if samba_shares is defined %}
|
2015-11-05 10:13:00 +00:00
|
|
|
## Shared directories
|
2015-03-13 20:55:33 +00:00
|
|
|
{% for share in samba_shares %}
|
|
|
|
[{{ share.name }}]
|
2015-11-05 10:13:00 +00:00
|
|
|
{% if share.comment is defined %}
|
2015-03-13 23:32:37 +00:00
|
|
|
comment = {{ share.comment }}
|
2015-11-05 10:13:00 +00:00
|
|
|
{% endif %}
|
2015-03-13 23:32:37 +00:00
|
|
|
path = {{ samba_shares_root }}/{{ share.name }}
|
|
|
|
public = {{ share.public|default('no') }}
|
2015-11-05 10:13:00 +00:00
|
|
|
{% if share.valid_users is defined %}
|
2015-03-14 00:17:48 +00:00
|
|
|
valid users= {{ share.valid_users }}
|
2015-11-05 10:13:00 +00:00
|
|
|
{% endif %}
|
|
|
|
{% if share.write_list is defined %}
|
2015-03-13 23:32:37 +00:00
|
|
|
write list = {{ share.write_list }}
|
2015-11-05 10:13:00 +00:00
|
|
|
{% endif %}
|
|
|
|
{% if share.group is defined %}
|
2015-03-14 00:00:48 +00:00
|
|
|
force group = {{ share.group }}
|
2015-11-05 10:13:00 +00:00
|
|
|
{% endif %}
|
2015-03-13 23:32:37 +00:00
|
|
|
create mask = {{ share.create_mask|default('0664') }}
|
|
|
|
create mode = {{ share.create_mode|default('0664') }}
|
|
|
|
force create mode = {{ share.force_create_mode|default('0664') }}
|
|
|
|
directory mask = {{ share.directory_mask|default('0775') }}
|
|
|
|
directory mode = {{ share.directory_mode|default('0775') }}
|
|
|
|
force directory mode = {{ share.force_directory_mode|default('0775') }}
|
2015-11-05 10:13:00 +00:00
|
|
|
|
2015-03-13 20:55:33 +00:00
|
|
|
{% endfor %}
|
|
|
|
{% endif%}
|