Defaults + Syntax (#65)

zed defaults

zed syntax

scrub syntax

sanoid mit ts

health syntax

arc syntax

tmux syntax

smart syntax

restic handler

restic syntax

postfix syntax

chrony syntax

muster script mit ts

muster syntax

motd meta

motd syntax

smb syntax

f2b syntax

moreutils als standardsoftware

rasdaemon + cv4pve. date durch ts ersetzt

dokuwiki defaults

dokuwiki syntax

cv4 handler entfernt

apt manage sources: / in var

apt install packages syntax

apcupsd syntax

acng defaults

acng syntax

Co-authored-by: Michael Grote <michael.grote@posteo.de>
Reviewed-on: mg/ansible#65
Co-Authored-By: mg <mg@noreply.git.mgrote.net>
Co-Committed-By: mg <mg@noreply.git.mgrote.net>
This commit is contained in:
Michael Grote 2021-04-09 23:29:03 +02:00
parent 00d6371d06
commit d7dd0ef313
46 changed files with 136 additions and 136 deletions

View file

@ -27,7 +27,7 @@
postfix_smtp_server_port: 587
postfix_smtp_use_tls: "yes"
### mgrote.apt_manage_sources
manage_sources_apt_proxy_url: "acng.grote.lan:9999"
manage_sources_apt_proxy_url: "acng.grote.lan:9999/"
### mgrote.restic
restic_folders_to_backup: "/usr/local /etc /root /home"
restic_cron_hours: "19"
@ -117,6 +117,7 @@
- net-tools
- apt-transport-https
- neofetch
- moreutils
- ntpdate
- acl
- vim

View file

@ -1,3 +1,4 @@
---
- name: acng_starten_aktivieren
become: yes
systemd:

View file

@ -1,3 +1,4 @@
---
- name: install apt-cacher-ng packages
become: yes
ansible.builtin.package:

View file

@ -26,7 +26,7 @@ SupportDir: /usr/lib/apt-cacher-ng
# Can be set to 9999 to emulate apt-proxy. Value of 0 turns off TCP server
# (SocketPath must be set in this case).
#
Port:{{ acng_server_port }}
Port:{{ acng_server_port | default (9999) }}
# Addresses or hostnames to listen on. Multiple addresses must be separated by
# spaces. Each entry must be an exact local address which is associated with a
@ -115,7 +115,7 @@ ReportPage: acng-report.html
# available for some days (mirror downtime) then there is a risk of removal of
# still useful package files.
#
ExThreshold: {{ acng_server_exthreshold }}
ExThreshold: {{ acng_server_exthreshold | default (60) }}
# If the expiration is run daily, it sometimes does not make much sense to do
# it because the expected changes (i.e. removal of expired files) don't justify

View file

@ -1,3 +1,4 @@
---
- name: restart_apcupsd #wird aufgerufen wenn apcupsd.conf_kopieren nach aenderungen den status "changed hat"
become: yes
systemd:

View file

@ -1,11 +1,11 @@
{{ file_header | default () }}
deb http://{{ manage_sources_apt_proxy_url }}/de.archive.ubuntu.com/ubuntu/ {{ansible_distribution_release}} main restricted
deb http://{{ manage_sources_apt_proxy_url }}/de.archive.ubuntu.com/ubuntu/ {{ansible_distribution_release}}-updates main restricted
deb http://{{ manage_sources_apt_proxy_url }}/de.archive.ubuntu.com/ubuntu/ {{ansible_distribution_release}} universe
deb http://{{ manage_sources_apt_proxy_url }}/de.archive.ubuntu.com/ubuntu/ {{ansible_distribution_release}}-updates universe
deb http://{{ manage_sources_apt_proxy_url }}/de.archive.ubuntu.com/ubuntu/ {{ansible_distribution_release}} multiverse
deb http://{{ manage_sources_apt_proxy_url }}/de.archive.ubuntu.com/ubuntu/ {{ansible_distribution_release}}-updates multiverse
deb http://{{ manage_sources_apt_proxy_url }}/de.archive.ubuntu.com/ubuntu/ {{ansible_distribution_release}}-backports main restricted universe multiverse
deb http://{{ manage_sources_apt_proxy_url }}de.archive.ubuntu.com/ubuntu/ {{ansible_distribution_release}} main restricted
deb http://{{ manage_sources_apt_proxy_url }}de.archive.ubuntu.com/ubuntu/ {{ansible_distribution_release}}-updates main restricted
deb http://{{ manage_sources_apt_proxy_url }}de.archive.ubuntu.com/ubuntu/ {{ansible_distribution_release}} universe
deb http://{{ manage_sources_apt_proxy_url }}de.archive.ubuntu.com/ubuntu/ {{ansible_distribution_release}}-updates universe
deb http://{{ manage_sources_apt_proxy_url }}de.archive.ubuntu.com/ubuntu/ {{ansible_distribution_release}} multiverse
deb http://{{ manage_sources_apt_proxy_url }}de.archive.ubuntu.com/ubuntu/ {{ansible_distribution_release}}-updates multiverse
deb http://{{ manage_sources_apt_proxy_url }}de.archive.ubuntu.com/ubuntu/ {{ansible_distribution_release}}-backports main restricted universe multiverse
deb http://{{ manage_sources_apt_proxy_url }}/security.ubuntu.com/ubuntu {{ansible_distribution_release}}-security main restricted
deb http://{{ manage_sources_apt_proxy_url }}/security.ubuntu.com/ubuntu {{ansible_distribution_release}}-security universe
deb http://{{ manage_sources_apt_proxy_url }}/security.ubuntu.com/ubuntu {{ansible_distribution_release}}-security multiverse

View file

@ -1,6 +0,0 @@
- name: "smbd neustarten"
become: yes
systemd:
name: smbd
enabled: yes
state: restarted

View file

@ -16,9 +16,9 @@ function unlock() {
exlock
(
echo $(date)
/usr/local/bin/cv4pve/cv4pve-autosnap --host=127.0.0.1 --api-token {{ cv4pve_api_user }}={{ cv4pve_api_token }} --vmid="{{ cv4pve_vmid }}" snap --label='daily' --keep="{{ cv4pve_keep_snapshots }}" --state
/usr/local/bin/cv4pve/cv4pve-autosnap --host=127.0.0.1 --api-token {{ cv4pve_api_user }}={{ cv4pve_api_token }} --vmid="all" status
/usr/local/bin/cv4pve/cv4pve-autosnap --host=127.0.0.1 --api-token {{ cv4pve_api_user }}={{ cv4pve_api_token }} --vmid="{{ cv4pve_vmid }}" snap --label='daily' --keep="{{ cv4pve_keep_snapshots }}" --state | ts '%Y-%m-%d - %H-%M-%S'
/usr/local/bin/cv4pve/cv4pve-autosnap --host=127.0.0.1 --api-token {{ cv4pve_api_user }}={{ cv4pve_api_token }} --vmid="all" status | ts '%Y-%m-%d - %H-%M-%S'
) >> /var/log/cv4pve-autosnap.log 2>&1
unlock

View file

@ -28,7 +28,7 @@
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
<Directory {{ dokuwiki_install_path }}>
<Directory {{ dokuwiki_install_path | default (/var/www/dokuwiki ) }}>
AllowOverride All
Options -Indexes -MultiViews +FollowSymLinks
</Directory>

View file

@ -7,8 +7,6 @@ set -o errexit
# trap ctrl-c and call ctrl_c()
trap ctrl_c INT
(
echo "--------------------------------------------------"
echo $(date)
/usr/sbin/ras-mc-ctl --status
/usr/sbin/ras-mc-ctl --errors
/usr/sbin/ras-mc-ctl --status | ts '%Y-%m-%d - %H-%M-%S'
/usr/sbin/ras-mc-ctl --errors | ts '%Y-%m-%d - %H-%M-%S'
) >> /var/log/rasdaemon.log 2>&1

View file

@ -1,3 +1,4 @@
---
- name: restart_smbd
become: yes
systemd:

View file

@ -1,3 +1,4 @@
---
- name: Erzwinge_Aktualisierung
become: yes
command: update-motd

View file

@ -1,3 +1,4 @@
---
- name: install fortune
become: yes
ansible.builtin.package:
@ -13,7 +14,7 @@
- update-motd
state: present
when: ansible_facts['os_family'] == "Ubuntu"
##################
- name: 'remove unwanted motd messages'
become: yes
ansible.builtin.file:
@ -32,7 +33,7 @@
- 20-facts
- 90-updates
- 91-reboot
##################
- name: delete "Last Login" - Message
become: yes
ansible.builtin.lineinfile:

View file

@ -1,3 +1,4 @@
---
- name: restart_smbd
become: yes
systemd:

View file

@ -1,3 +1,4 @@
---
# für scripte
- name: create /etc/restic
become: yes

View file

@ -37,6 +37,8 @@ function unlock() {
exlock
#####################
HIER BEFEHLE EINSETZEN!
echo x | ts '%Y-%m-%d - %H-%M-%S'
#####################
#Hiermit wird die Lockdatei geloescht
unlock

View file

@ -1,3 +1,4 @@
---
- name: restart_chrony
become: yes
systemd:

View file

@ -1,3 +1,4 @@
---
- name: restart_chrony
become: yes
systemd:

View file

@ -1,3 +1,4 @@
---
- name: hash_sasl_passwd
become: yes
command: /usr/sbin/postmap hash:/etc/postfix/sasl_passwd

View file

@ -1,5 +1,5 @@
---
### postfix fuer gmail; http://dokuwiki2.grote.lan/artikel/technik/postfix_mit_gmail_fuer_benachrichtigungen_einrichten
- name: postfix + Hilfsprogramme installieren
become: yes
ansible.builtin.package:

View file

@ -1,3 +1,4 @@
---
- name: install restic-packages
become: yes
ansible.builtin.package:

View file

@ -1,3 +1,4 @@
---
- name: smartmontools_starten_aktivieren
become: yes
systemd:

View file

@ -1,3 +1,4 @@
---
#Blockdevice/Festplatten muessen haendisch in "templates" eingetragen werden
- name: smartmontools installieren
become: yes

View file

@ -1,3 +1,4 @@
---
- name: install tmux packages
become: yes
ansible.builtin.package:

View file

@ -22,16 +22,7 @@ function unlock() {
# Damit prueft ob das Script ob es schon laeuft
exlock
(
echo "--------------------------------------------------"
echo $(date +%d.%m.%Y-%T) sanoid start
echo ""
/usr/local/bin/sanoid --cron --verbose
echo ""
echo $(date +%d.%m.%Y-%T) sanoid end
) >> /var/log/sanoid-cron.log 2>&1 &
/usr/local/bin/sanoid --cron --verbose | ts '%Y-%m-%d - %H-%M-%S' >> /var/log/sanoid-cron.log 2>&1 &
#Hiermit wird die Lockdatei geloescht
unlock

View file

@ -1,2 +0,0 @@
---
empfaenger_mail: michael.grote@posteo.de

View file

@ -1,2 +1,3 @@
---
- name: testmail
shell: echo "zed ist eingerichtet" | mail -s "{{ ansible_hostname }} - zed" {{ empfaenger_mail }}