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

View file

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

View file

@ -1,3 +1,4 @@
---
- name: install apt-cacher-ng packages - name: install apt-cacher-ng packages
become: yes become: yes
ansible.builtin.package: 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 # Can be set to 9999 to emulate apt-proxy. Value of 0 turns off TCP server
# (SocketPath must be set in this case). # (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 # 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 # 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 # available for some days (mirror downtime) then there is a risk of removal of
# still useful package files. # 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 # 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 # 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" - name: restart_apcupsd #wird aufgerufen wenn apcupsd.conf_kopieren nach aenderungen den status "changed hat"
become: yes become: yes
systemd: systemd:

View file

@ -1,11 +1,11 @@
{{ file_header | default () }} {{ 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}} 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}}-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}} 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}}-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}} 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}}-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}}-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 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 universe
deb http://{{ manage_sources_apt_proxy_url }}/security.ubuntu.com/ubuntu {{ansible_distribution_release}}-security multiverse 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 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="{{ 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 /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 ) >> /var/log/cv4pve-autosnap.log 2>&1
unlock unlock

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,3 +1,4 @@
---
- name: hash_sasl_passwd - name: hash_sasl_passwd
become: yes become: yes
command: /usr/sbin/postmap hash:/etc/postfix/sasl_passwd 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 ### postfix fuer gmail; http://dokuwiki2.grote.lan/artikel/technik/postfix_mit_gmail_fuer_benachrichtigungen_einrichten
- name: postfix + Hilfsprogramme installieren - name: postfix + Hilfsprogramme installieren
become: yes become: yes
ansible.builtin.package: ansible.builtin.package:

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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