This commit is contained in:
2022-02-28 16:17:10 +01:00
parent 6649efc76e
commit 2775449515
77 changed files with 36441 additions and 116 deletions

View File

@ -0,0 +1,55 @@
#!/usr/bin/env bash
# *** [ Ansible managed: DO NOT EDIT DIRECTLY ] ***
declare -i pc_nr=1
pc_nr_max=14
brcast_ip="192.168.82.255"
ab1="38:60:77:39:9e:9f"
#ab2="38:60:77:39:9a:a3"
ab3="00:22:15:aa:88:b9"
ab4="00:22:4d:b0:f3:d6"
ab5="80:ee:73:b9:8b:d3 80:ee:73:b9:8b:d4"
ab6="80:ee:73:c0:80:22"
ab7="80:ee:73:c5:2e:fb 80:ee:73:c5:2e:fc"
ab8="80:ee:73:d0:a5:71 80:ee:73:d0:a5:72"
ab9="80:ee:73:e0:0e:8a 80:ee:73:e0:0e:8b"
ab10="00:d8:61:c9:c8:3d"
ab11="a8:a1:59:44:73:f8"
ab12="a8:a1:59:4f:d4:0f"
ab13="a8:a1:59:93:15:27"
ab14="a8:a1:59:93:16:20"
if [ $# = "1" ]; then
echo ""
echo -e " \033[32mWake up PC '$1'\033[m.."
_nic=`eval eval echo '$'$1`
if [[ -n "$_nic" ]]; then
for _mac in $_nic ; do
echo -n " "
wakeonlan -i $brcast_ip $_mac
sleep 1
done
else
echo -e " \033[1;31mPC '$1' NOT found!\033[m"
fi
echo ""
else
while [[ $pc_nr -le $pc_nr_max ]]; do
[[ -z "$pc_nr" ]] && continue
_nic=$(eval eval echo '$ab'$pc_nr)
if [[ -n "$_nic" ]]; then
echo ""
echo -e " \033[32mWake up PC 'ab$pc_nr'\033[m.."
for _mac in $_nic ; do
echo -n " "
/usr/bin/wakeonlan -i $brcast_ip $_mac
sleep 1
done
fi
(( pc_nr++ ))
done
echo ""
fi

View File

@ -0,0 +1,28 @@
#!/usr/bin/env bash
# *** [ Ansible managed: DO NOT EDIT DIRECTLY ] ***
pcbuero1="90:e2:ba:0c:bb:fb"
#pcbuero2="00:1d:7d:e5:3f:9f"
pcbuero2="fc:aa:14:30:8c:35"
pcbuero2_alt="90:e2:ba:0c:bc:0e"
pcbuero3="80:ee:73:b9:8a:d6"
pcbuero4="70:85:c2:fb:6a:c8"
if [ $# = "1" ]; then
_nic=`eval eval echo '$'$1`
wakeonlan $_nic
else
wakeonlan $pcbuero1
sleep 2
wakeonlan $pcbuero2
sleep 2
wakeonlan $pcbuero3
sleep 2
wakeonlan $pcbuero4
sleep 2
wakeonlan $pcbuero2_alt
fi
exit 0

View File

@ -81,3 +81,12 @@
daemon_reload: yes
state: restarted
- name: reload Pure-FTPd users
command: pure-pw mkdb
- name: restart Pure-FTPd
service:
name: pure-ftpd
state: restarted

View File

@ -93,6 +93,8 @@
register: clean_samba_trash_exists
when:
- "groups['samba_server']|string is search(inventory_hostname)"
tags:
- samba-server
- name: (samba-install.yml) Adjust configuration for script 'clean_samba_trash.sh'
template:
@ -115,6 +117,8 @@
register: clean_samba_trash_dirs
when:
- "groups['samba_server']|string is search(inventory_hostname)"
tags:
- samba-server
- name: (samba-install.yml) Creates a cron job for cleaning up samba trash dirs
@ -130,6 +134,8 @@
when:
- "groups['samba_server']|string is search(inventory_hostname)"
- clean_samba_trash_dirs.found
tags:
- samba-server
# ---
@ -142,6 +148,8 @@
register: set_permissions_on_samba_shares_exists
when:
- "groups['samba_server']|string is search(inventory_hostname)"
tags:
- samba-server
- name: (samba-install.yml) Adjust configuration for script 'set_permissions_samba_shares.sh'
template:
@ -167,6 +175,8 @@
when:
- "groups['samba_server']|string is search(inventory_hostname)"
- clean_samba_trash_dirs.found
tags:
- samba-server
# ---

View File

@ -31,10 +31,12 @@ SystemGroup lpadmin
#ConfigFilePerm 0640
#LogFilePerm 00640
{% if ansible_facts['distribution'] == "Debian" %}
# Specifies the group name or ID that will be used for log files.
# The default group in Debian is "adm".
LogFileGroup adm
{% endif %}
# Location of the file logging all access to the scheduler; may be the name
# "syslog". If not an absolute path, the value of ServerRoot is used as the
# root directory. Also see the "AccessLogLevel" directive in cupsd.conf.

View File

@ -44,6 +44,22 @@
; netbios name = FILE
netbios name = {{ samba_netbios_name|default('FILE') }}
{% if samba_server_min_protocol is defined and samba_server_min_protocol|length > 0 %}
# This setting controls the minimum protocol version that the server will allow
# the client to use. Normally this option should not be set as the automatic
# negotiation phase in the SMB protocol takes care of choosing the appropriate
# protocol unless you have legacy clients which are SMB1 capable only.
#
# See Related command: server max protocol for a full list of available protocols.
#
# Default: server min protocol = SMB2_02
#
# Example: server min protocol = NT1
#
server min protocol = {{ samba_server_min_protocol }}
{% endif %}
#### Networking ####

View File

@ -1,78 +0,0 @@
#!/usr/bin/env bash
# {{ ansible_managed }}
declare -i pc_nr=101
pc_nr_max=135
brcast_ip="192.168.112.255"
pc101="80:ee:73:ea:3a:9d 80:ee:73:ea:3a:9e"
pc102="80:ee:73:ea:3a:e7 80:ee:73:ea:3a:e8"
pc103="80:ee:73:ea:3a:0b 80:ee:73:ea:3a:0c"
pc104="80:ee:73:ea:3b:73 80:ee:73:ea:3b:74"
pc105="80:ee:73:c5:e7:4f 80:ee:73:c5:e7:50"
pc106="20:25:64:0c:55:ca"
pc107="10:e7:c6:37:f7:35"
pc108="74:d4:35:8d:0d:8c"
pc109="80:ee:73:e2:20:8b 80:ee:73:e2:20:8c"
pc110="80:ee:73:c5:e6:5f 80:ee:73:c5:e6:60"
pc111="80:ee:73:b5:e4:50 80:ee:73:b5:e4:51"
pc112="f8:b4:6a:be:48:75"
pc113="20:25:64:0c:55:6b"
pc114="00:22:4d:88:4b:d0"
pc115="00:22:4d:88:4b:be"
pc116="80:ee:73:c9:91:d7 80:ee:73:c9:91:d8"
pc117="74:d4:35:be:a4:5a"
pc118="b0:0c:d1:54:ed:12"
pc121="80:ee:73:bd:ad:56 80:ee:73:bd:ad:57"
pc123="00:22:4d:88:4b:33"
pc124="80:ee:73:c0:7f:fb 80:ee:73:c0:7f:fc"
pc125="80:ee:73:b9:8e:9b 80:ee:73:b9:8e:9c"
pc126="80:ee:73:c5:e8:39 80:ee:73:c5:e8:3a"
pc127="a8:a1:59:0c:d5:eb"
pc128="a8:a1:59:0d:01:b9"
#pc129="a8:a1:59:0a:28:22"
pc129="a8:a1:59:06:12:b8"
pc135="1c:69:7a:a3:e1:b3"
#pc119="00:22:4d:88:4b:b2"
pc120="00:22:4d:88:48:c7"
pc122="00:22:4d:88:4b:dc"
#pc127="08:9e:01:35:10:55"
#pc128="80:ee:73:b5:e2:95"
pc131="80:ee:73:d9:de:32"
if [ $# = "1" ]; then
echo ""
echo -e " \033[32mWake up PC '$1'\033[m.."
_nic=`eval eval echo '$'$1`
if [[ -n "$_nic" ]]; then
for _mac in $_nic ; do
echo -n " "
wakeonlan -i $brcast_ip $_mac
sleep 1
done
else
echo -e " \033[1;31mPC '$1' NOT found!\033[m"
fi
echo ""
else
while [[ $pc_nr -le $pc_nr_max ]]; do
[[ -z "$pc_nr" ]] && continue
_nic=$(eval eval echo '$pc'$pc_nr)
if [[ -n "$_nic" ]]; then
echo ""
echo -e " \033[32mWake up PC 'pc$pc_nr'\033[m.."
for _mac in $_nic ; do
echo -n " "
/usr/bin/wakeonlan -i $brcast_ip $_mac
sleep 1
done
fi
(( pc_nr++ ))
done
echo ""
fi