Update..
This commit is contained in:
@ -18,7 +18,7 @@
|
||||
|
||||
{% set count.nfs_exports = count.nfs_exports + 10 %}
|
||||
{% for network in export.export_networks %}
|
||||
{% if export.fs_encrypted is defined and export.fs_encrypted is sameas true %}
|
||||
{% if export.use_fsid_option is defined and export.use_fsid_option is sameas true %}
|
||||
{% set export_str.nfs_exports = export_str.nfs_exports~" "~network~"("~export.export_opt~",fsid="~count.nfs_exports~")" %}
|
||||
#{{ export.src.split(":")[1] }} {{ network }}({{ export.export_opt }},fsid={{ count.nfs_exports }})
|
||||
{% else %}
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
# Change this to the workgroup/NT-domain name your Samba server will part of
|
||||
; workgroup = WORKGROUP
|
||||
workgroup = AKB
|
||||
workgroup = {{ samba_workgroup|default('WORKGROUP') }}
|
||||
|
||||
# Option 'netbios name' added to debian's default smb.conf
|
||||
#
|
||||
@ -41,22 +41,8 @@
|
||||
# Note that the maximum length for a NetBIOS name is 15 characters.
|
||||
#
|
||||
# Default: netbios name = # machine DNS name
|
||||
netbios name = FILE-AKB
|
||||
|
||||
# server string (G)
|
||||
#
|
||||
# This controls what string will show up in the printer comment box in print manager and next to the IPC
|
||||
# connection in net view. It can be any string that you wish to show to your users.
|
||||
#
|
||||
# It also sets what will appear in browse lists next to the machine name.
|
||||
#
|
||||
# A %v will be replaced with the Samba version number.
|
||||
#
|
||||
# A %h will be replaced with the hostname.
|
||||
#
|
||||
# Default: server string = Samba %v
|
||||
#
|
||||
server string = File Server ( Samba %v )
|
||||
; netbios name = FILE
|
||||
netbios name = {{ samba_netbios_name|default('FILE') }}
|
||||
|
||||
|
||||
#### Networking ####
|
||||
@ -65,7 +51,7 @@
|
||||
# This can be either the interface name or an IP address/netmask;
|
||||
# interface names are normally preferred
|
||||
; interfaces = 127.0.0.0/8 eth0
|
||||
interfaces = {{ ansible_default_ipv4.address }}/24 127.0.0.1/8
|
||||
interfaces = {{ ansible_default_ipv4.address }}/24 127.0.0.1/8
|
||||
|
||||
# Option 'hosts deny' and 'hosts allow' added to debian's default smb.conf
|
||||
hosts deny = 0.0.0.0/0
|
||||
@ -115,8 +101,7 @@
|
||||
# Default: log level = 0
|
||||
#
|
||||
# Example: log level = 3 passdb:5 auth:10 winbind:2
|
||||
; log level = 0
|
||||
log level = 2
|
||||
log level = 0
|
||||
|
||||
# Do something sensible when Samba crashes: mail the admin a backtrace
|
||||
panic action = /usr/share/samba/panic-action %d
|
||||
@ -278,11 +263,11 @@
|
||||
|
||||
# By default, the home directories are exported read-only. Change the
|
||||
# next parameter to 'no' if you want to be able to write to them.
|
||||
read only = no
|
||||
read only = yes
|
||||
|
||||
# File creation mask is set to 0700 for security reasons. If you want to
|
||||
# create files with group=rw permissions, set next parameter to 0775.
|
||||
create mask = 0600
|
||||
create mask = 0700
|
||||
|
||||
# Directory creation mask is set to 0700 for security reasons. If you want to
|
||||
# create dirs. with group=rw permissions, set next parameter to 0775.
|
||||
@ -295,7 +280,6 @@
|
||||
# This might need tweaking when using external authentication schemes
|
||||
valid users = %S
|
||||
|
||||
|
||||
# Un-comment the following and create the netlogon directory for Domain Logons
|
||||
# (you need to configure Samba to act as a domain controller too.)
|
||||
;[netlogon]
|
||||
@ -317,17 +301,20 @@
|
||||
; create mask = 0600
|
||||
; directory mask = 0700
|
||||
|
||||
|
||||
{% for item in samba_shares | default([]) %}
|
||||
|
||||
[{{ item.name }}]
|
||||
comment = {{ item.name }}
|
||||
path = {{ item.path }}
|
||||
|
||||
create mask = 0660
|
||||
force create mode = 0660
|
||||
directory mask = 2770
|
||||
force directory mode = 2770
|
||||
browseable = yes
|
||||
read only = no
|
||||
writeable = Yes
|
||||
|
||||
create mask = {{ item.file_create_mask | default('0660') }}
|
||||
force create mode = {{ item.file_create_mask | default('0660') }}
|
||||
directory mask = {{ item.dir_create_mask | default('2770') }}
|
||||
force directory mode = {{ item.dir_create_mask | default('2770') }}
|
||||
|
||||
# can login into that share
|
||||
valid users = @{{ item.group_valid_users }}
|
||||
@ -335,10 +322,11 @@
|
||||
write list = @{{ item.group_write_list }}
|
||||
|
||||
force group = +{{ item.group_write_list }}
|
||||
{% if item.vfs_object_recycle is defined and item.vfs_object_recycle|bool %}
|
||||
|
||||
vfs objects = recycle
|
||||
recycle:keeptree = yes
|
||||
# touch access time from this file
|
||||
# touch access time from this file
|
||||
# note: this is not the modified time, which is
|
||||
# outdatet by ls-command
|
||||
# so yo can delete files older then n day with the following command:
|
||||
@ -347,22 +335,29 @@
|
||||
recycle:touch = yes
|
||||
recycle:touch_mtime = no
|
||||
recycle:versions = yes
|
||||
recycle:maxsize = 10485760 # around 10MB
|
||||
recycle:directory_mode = 2770
|
||||
|
||||
# - Dateien gößer als 10MB werden nicht
|
||||
#recycle:maxsize = 10485760 # around 10MB
|
||||
|
||||
# - Keine Begrenzung der Dateigröße.
|
||||
recycle:maxsize = 0
|
||||
|
||||
recycle:exclude = *.tmp,*.temp,*.o,*.obj,~$*,*.~??
|
||||
recycle:excludedir = /tmp,/temp,/cache,.Trash
|
||||
recycle:repository = .Trash/%U
|
||||
recycle:repository = {{ item.recycle_path | default('@Recycle.Bin') }}
|
||||
|
||||
# - This is a list of files and directories that are neither visible nor accessible.
|
||||
# - Each entry in the list must be separated by a '/', which allows spaces to be
|
||||
# - included in the entry. '*' and '?' can be used to specify multiple files or
|
||||
# - directories as in DOS wildcards.
|
||||
# -
|
||||
veto files = /.Trash/
|
||||
|
||||
[{{ item.name }}-Trash]
|
||||
comment = Papierkorb ({{ item.name }})
|
||||
path = {{ item.path }}/.Trash
|
||||
|
||||
browseable = yes
|
||||
read only = yes
|
||||
delete veto files = yes
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
|
||||
;[printers]
|
||||
; comment = All Printers
|
||||
; browseable = no
|
||||
|
File diff suppressed because it is too large
Load Diff
10
roles/common/templates/lib/systemd/system/x11vnc.service.j2
Normal file
10
roles/common/templates/lib/systemd/system/x11vnc.service.j2
Normal file
@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Start x11vnc at startup.
|
||||
After=multi-user.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/x11vnc -auth guess -forever -loop -noxdamage -repeat -rfbauth /etc/x11vnc.pass -rfbport 5900 -shared
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@ -0,0 +1,40 @@
|
||||
# {{ ansible_managed }}
|
||||
|
||||
# ------------------------------------
|
||||
# - Settings for script clean_trash.sh
|
||||
# ------------------------------------
|
||||
|
||||
# - days
|
||||
# -
|
||||
# - Files older then 'days' will be deleted.
|
||||
# -
|
||||
# - Defaults to: days=31
|
||||
# -
|
||||
#days=31
|
||||
|
||||
# - trash_dirs
|
||||
# -
|
||||
# - Directories where files older than given days will be deleted.
|
||||
# -
|
||||
# - Example:
|
||||
# - trash_dirs="/data/samba/transfer/.Trash /data/samba/no-backup-share/multimedia/.Trash"
|
||||
# -
|
||||
#trash_dirs=""
|
||||
|
||||
{%- set count = namespace(trash_dirs=0) %}
|
||||
|
||||
{%- for item in samba_shares | default([]) %}
|
||||
{% if (item.vfs_object_recycle is defined and item.vfs_object_recycle|bool) %}
|
||||
{% set count.trash_dirs = count.trash_dirs + 1 %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% if count.trash_dirs > 0 %}
|
||||
trash_dirs="
|
||||
{% for item in samba_shares %}
|
||||
{% if (item.vfs_object_recycle is defined and item.vfs_object_recycle|bool) %}
|
||||
{{ item.path }}/{{ item.recycle_path }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
"
|
||||
{% endif %}
|
@ -0,0 +1,33 @@
|
||||
# {{ ansible_managed }}
|
||||
|
||||
# -----------------------------------------------------
|
||||
# - Settings for script set_permissions_samba_shares.sh
|
||||
# -----------------------------------------------------
|
||||
|
||||
# - dir_permissions
|
||||
# -
|
||||
# - Recursive set Permissions (group and file- and directory-mode)
|
||||
# -
|
||||
# - Multiple options are possible. Use semicolon separated list.
|
||||
# -
|
||||
# - Usage:
|
||||
# - dir_permissions="<directory>:<group>:<file-mod>:<dir-mod>;[<directory>:<group>:<file-mod>:<dir-mod>];[.."
|
||||
# -
|
||||
# - Example:
|
||||
# - dir_permissions="/data/samba/transfer:buero:664:2775;/data/samba/verwaltung:intern:660:2770"
|
||||
# -
|
||||
#dir_permissions=""
|
||||
|
||||
{%- set count = namespace(samba_shares=0) %}
|
||||
|
||||
{%- for item in samba_shares | default([]) %}
|
||||
{% set count.samba_shares = count.samba_shares + 1 %}
|
||||
{% endfor %}
|
||||
|
||||
{% if count.samba_shares > 0 %}
|
||||
dir_permissions="
|
||||
{% for item in samba_shares | default([]) %}
|
||||
{{ item.path }}:{{ item.group_write_list }}:{{ item.file_create_mask | default('0660') }}:{{ item.dir_create_mask | default('2770') }};
|
||||
{% endfor %}
|
||||
"
|
||||
{% endif %}
|
Reference in New Issue
Block a user