redisign ..
This commit is contained in:
@ -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 %}
|
62
roles/common/templates/root/bin/wakeup_lan.sh.j2
Executable file
62
roles/common/templates/root/bin/wakeup_lan.sh.j2
Executable file
@ -0,0 +1,62 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# {{ ansible_managed }}
|
||||
|
||||
cl101="80:ee:73:c5:e9:b9"
|
||||
cl101_alt="70:71:bc:72:25:98"
|
||||
cl102="80:ee:73:c5:d3:87"
|
||||
cl103="80:ee:73:bb:da:93"
|
||||
cl103_alt="70:71:bc:72:24:cc"
|
||||
cl104="74:d4:35:ac:78:19"
|
||||
cl105_alt="70:71:bc:72:25:93"
|
||||
cl105="80:ee:73:c5:2c:97"
|
||||
cl106_alt="70:71:bc:72:26:e4"
|
||||
cl106="80:ee:73:c5:2d:8d"
|
||||
cl107_alt="e0:69:95:45:71:4b"
|
||||
cl107="80:ee:73:c5:2e:83"
|
||||
cl108_alt="70:71:bc:72:25:85"
|
||||
cl108="80:ee:73:d0:a3:30"
|
||||
cl109="38:60:77:39:f2:49"
|
||||
cl110="38:60:77:4e:34:fe"
|
||||
|
||||
if [ $# = "1" ]; then
|
||||
_nic=`eval eval echo '$'$1`
|
||||
wakeonlan $_nic
|
||||
else
|
||||
wakeonlan $cl101
|
||||
sleep 2
|
||||
wakeonlan $cl101_alt
|
||||
sleep 2
|
||||
wakeonlan $cl102
|
||||
sleep 2
|
||||
wakeonlan $cl103
|
||||
sleep 2
|
||||
wakeonlan $cl103_alt
|
||||
sleep 2
|
||||
wakeonlan $cl104
|
||||
sleep 2
|
||||
wakeonlan $cl105
|
||||
sleep 2
|
||||
wakeonlan $cl105_alt
|
||||
sleep 2
|
||||
wakeonlan $cl106
|
||||
sleep 2
|
||||
wakeonlan $cl106_alt
|
||||
sleep 2
|
||||
wakeonlan $cl107
|
||||
sleep 2
|
||||
wakeonlan $cl107_alt
|
||||
sleep 2
|
||||
wakeonlan $cl108
|
||||
sleep 2
|
||||
wakeonlan $cl108_alt
|
||||
sleep 2
|
||||
wakeonlan $cl109
|
||||
sleep 2
|
||||
wakeonlan $cl110
|
||||
sleep 2
|
||||
fi
|
||||
|
||||
|
||||
exit 0
|
||||
|
Reference in New Issue
Block a user