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:
parent
00d6371d06
commit
d7dd0ef313
46 changed files with 136 additions and 136 deletions
|
@ -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
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
acng_server_exthreshold: "60"
|
||||
acng_server_port: 9999
|
||||
acng_server_exthreshold: "60"
|
||||
acng_server_port: 9999
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
- name: acng_starten_aktivieren
|
||||
become: yes
|
||||
systemd:
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
- name: install apt-cacher-ng packages
|
||||
become: yes
|
||||
ansible.builtin.package:
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
- name: restart_apcupsd #wird aufgerufen wenn apcupsd.conf_kopieren nach aenderungen den status "changed hat"
|
||||
become: yes
|
||||
systemd:
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
---
|
||||
dependencies:
|
||||
- role: mgrote.postfix
|
||||
galaxy_info:
|
||||
author: mgrote
|
||||
description: installs apcupsd
|
||||
min_ansible_version: 2.0
|
||||
license: GPLv3
|
||||
platforms:
|
||||
- name: Proxmox
|
||||
versions:
|
||||
- all
|
||||
galaxy_tags:
|
||||
- system
|
||||
dependencies:
|
||||
- role: mgrote.postfix
|
||||
galaxy_info:
|
||||
author: mgrote
|
||||
description: installs apcupsd
|
||||
min_ansible_version: 2.0
|
||||
license: GPLv3
|
||||
platforms:
|
||||
- name: Proxmox
|
||||
versions:
|
||||
- all
|
||||
galaxy_tags:
|
||||
- system
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
- name: "smbd neustarten"
|
||||
become: yes
|
||||
systemd:
|
||||
name: smbd
|
||||
enabled: yes
|
||||
state: restarted
|
|
@ -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
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
dependencies:
|
||||
- role: mgrote.postfix
|
||||
dependencies:
|
||||
- role: mgrote.postfix
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
dependencies:
|
||||
- role: mgrote.postfix
|
||||
dependencies:
|
||||
- role: mgrote.postfix
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
---
|
||||
- name: install fail2ban-packages
|
||||
become: yes
|
||||
ansible.builtin.package:
|
||||
name: fail2ban
|
||||
state: present
|
||||
- name: install fail2ban-packages
|
||||
become: yes
|
||||
ansible.builtin.package:
|
||||
name: fail2ban
|
||||
state: present
|
||||
|
||||
- name: copy jail.local
|
||||
become: yes
|
||||
ansible.builtin.template:
|
||||
src: jail.local
|
||||
dest: /etc/fail2ban/jail.local
|
||||
mode: 0750
|
||||
notify: restart_f2b
|
||||
- name: copy jail.local
|
||||
become: yes
|
||||
ansible.builtin.template:
|
||||
src: jail.local
|
||||
dest: /etc/fail2ban/jail.local
|
||||
mode: 0750
|
||||
notify: restart_f2b
|
||||
|
||||
- name: copy sendmail-common.local
|
||||
become: yes
|
||||
ansible.builtin.template:
|
||||
src: sendmail-common.local
|
||||
dest: /etc/fail2ban/action.d/sendmail-common.local
|
||||
mode: 0750
|
||||
notify: restart_f2b
|
||||
- name: copy sendmail-common.local
|
||||
become: yes
|
||||
ansible.builtin.template:
|
||||
src: sendmail-common.local
|
||||
dest: /etc/fail2ban/action.d/sendmail-common.local
|
||||
mode: 0750
|
||||
notify: restart_f2b
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
- name: restart_smbd
|
||||
become: yes
|
||||
systemd:
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
---
|
||||
motd_wetter_ort: "Magdeburg"
|
||||
motd_wetter_aktiv: false
|
||||
motd_fortune_aktiv: false
|
||||
motd_wetter_ort: "Magdeburg"
|
||||
motd_wetter_aktiv: false
|
||||
motd_fortune_aktiv: false
|
||||
|
||||
managed_files:
|
||||
- 00-ansible
|
||||
- 05-fortune
|
||||
- 10-wetter
|
||||
- 20-facts
|
||||
- 90-updates
|
||||
- 91-reboot
|
||||
managed_files:
|
||||
- 00-ansible
|
||||
- 05-fortune
|
||||
- 10-wetter
|
||||
- 20-facts
|
||||
- 90-updates
|
||||
- 91-reboot
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
- name: Erzwinge_Aktualisierung
|
||||
become: yes
|
||||
command: update-motd
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
acng_server_exthreshold: "60"
|
||||
acng_server_port: 9999
|
||||
acng_server_exthreshold: "60"
|
||||
acng_server_port: 9999
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
- name: restart_smbd
|
||||
become: yes
|
||||
systemd:
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
---
|
||||
dependencies:
|
||||
- role: hedii.youtube-dl
|
||||
vars:
|
||||
youtubedl_executable_path: "/usr/local/bin/youtube-dl"
|
||||
youtubedl_update: true
|
||||
galaxy_info:
|
||||
author: mgrote
|
||||
description: XXX
|
||||
min_ansible_version: 2.0
|
||||
license: GPLv3
|
||||
platforms:
|
||||
- name: Ubuntu
|
||||
versions:
|
||||
- all
|
||||
galaxy_tags:
|
||||
- system
|
||||
dependencies:
|
||||
- role: hedii.youtube-dl
|
||||
vars:
|
||||
youtubedl_executable_path: "/usr/local/bin/youtube-dl"
|
||||
youtubedl_update: true
|
||||
galaxy_info:
|
||||
author: mgrote
|
||||
description: XXX
|
||||
min_ansible_version: 2.0
|
||||
license: GPLv3
|
||||
platforms:
|
||||
- name: Ubuntu
|
||||
versions:
|
||||
- all
|
||||
galaxy_tags:
|
||||
- system
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
# für scripte
|
||||
- name: create /etc/restic
|
||||
become: yes
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
- name: restart_chrony
|
||||
become: yes
|
||||
systemd:
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
- name: restart_chrony
|
||||
become: yes
|
||||
systemd:
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
- name: hash_sasl_passwd
|
||||
become: yes
|
||||
command: /usr/sbin/postmap hash:/etc/postfix/sasl_passwd
|
||||
|
|
|
@ -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
|
||||
become: yes
|
||||
ansible.builtin.package:
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
- name: install restic-packages
|
||||
become: yes
|
||||
ansible.builtin.package:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
smart_smartctlmail_cron_minutes: 15
|
||||
smart_smartctlmail_cron_hours: 6
|
||||
smart_smartctlmail_cron_weekday: 3
|
||||
smart_smartctl_mail_pfad_smartctl: "/usr/sbin/smartctl"
|
||||
smart_smartctlmail_cron_minutes: 15
|
||||
smart_smartctlmail_cron_hours: 6
|
||||
smart_smartctlmail_cron_weekday: 3
|
||||
smart_smartctl_mail_pfad_smartctl: "/usr/sbin/smartctl"
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
- name: smartmontools_starten_aktivieren
|
||||
become: yes
|
||||
systemd:
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
---
|
||||
dependencies:
|
||||
- role: mgrote.postfix
|
||||
galaxy_info:
|
||||
author: mgrote
|
||||
description: installs smartctl and configures it
|
||||
min_ansible_version: 2.0
|
||||
license: GPLv3
|
||||
platforms:
|
||||
- name: Ubuntu
|
||||
versions:
|
||||
- all
|
||||
galaxy_tags:
|
||||
- system
|
||||
dependencies:
|
||||
- role: mgrote.postfix
|
||||
galaxy_info:
|
||||
author: mgrote
|
||||
description: installs smartctl and configures it
|
||||
min_ansible_version: 2.0
|
||||
license: GPLv3
|
||||
platforms:
|
||||
- name: Ubuntu
|
||||
versions:
|
||||
- all
|
||||
galaxy_tags:
|
||||
- system
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#Blockdevice/Festplatten muessen haendisch in "templates" eingetragen werden
|
||||
---
|
||||
#Blockdevice/Festplatten muessen haendisch in "templates" eingetragen werden
|
||||
- name: smartmontools installieren
|
||||
become: yes
|
||||
ansible.builtin.package:
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
- name: install tmux packages
|
||||
become: yes
|
||||
ansible.builtin.package:
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
---
|
||||
zfs_extra_arc_max_size: "8589934592" #in Bytes
|
||||
zfs_extra_arc_max_size: "8589934592" #in Bytes
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
dependencies:
|
||||
- role: mgrote.zfs_packages
|
||||
dependencies:
|
||||
- role: mgrote.zfs_packages
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
---
|
||||
zfs_extra_cron_minutes_zfs_health: "0,15,30,45"
|
||||
zfs_extra_cron_hours_zfs_health: "*"
|
||||
zfs_extra_max_usage_health: "80"
|
||||
zfs_extra_cron_minutes_zfs_health: "0,15,30,45"
|
||||
zfs_extra_cron_hours_zfs_health: "*"
|
||||
zfs_extra_max_usage_health: "80"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
---
|
||||
zfs_extra_path_zpool: "/usr/sbin/zpool"
|
||||
zfs_extra_path_zpool: "/usr/sbin/zpool"
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
dependencies:
|
||||
- role: mgrote.zfs_packages
|
||||
dependencies:
|
||||
- role: mgrote.zfs_packages
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
---
|
||||
empfaenger_mail: michael.grote@posteo.de
|
|
@ -1,2 +1,3 @@
|
|||
---
|
||||
- name: testmail
|
||||
shell: echo "zed ist eingerichtet" | mail -s "{{ ansible_hostname }} - zed" {{ empfaenger_mail }}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
---
|
||||
dependencies:
|
||||
- role: mgrote.postfix
|
||||
- role: mgrote.zfs_packages
|
||||
dependencies:
|
||||
- role: mgrote.postfix
|
||||
- role: mgrote.zfs_packages
|
||||
|
|
Loading…
Reference in a new issue