From d7dd0ef313fba27255122112920d5c434f2896b7 Mon Sep 17 00:00:00 2001 From: mg Date: Fri, 9 Apr 2021 23:29:03 +0200 Subject: [PATCH] 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 Reviewed-on: https://git.mgrote.net/mg/ansible/pulls/65 Co-Authored-By: mg Co-Committed-By: mg --- group_vars/all.yml | 3 +- roles/mgrote.acng/defaults/main.yml | 4 +- roles/mgrote.acng/handlers/main.yml | 1 + roles/mgrote.acng/tasks/main.yml | 1 + roles/mgrote.acng/templates/acng.conf | 4 +- roles/mgrote.apcupsd/handlers/main.yml | 1 + roles/mgrote.apcupsd/meta/main.yml | 26 ++++++------- .../handlers/main.yml | 0 .../templates/ubuntu_sources.list | 14 +++---- .../mgrote.cv4pve-autosnap/handlers/main.yml | 6 --- .../templates/cv4pve-script.sh | 6 +-- roles/mgrote.dokuwiki/meta/main.yml | 4 +- .../templates/000-default.conf | 2 +- .../templates/rasdaemon-cron.sh | 6 +-- roles/mgrote.fail2ban/meta/main.yml | 4 +- roles/mgrote.fail2ban/tasks/main.yml | 38 +++++++++---------- roles/mgrote.fileserver_smb/handlers/main.yml | 1 + roles/mgrote.motd/defaults/main.yml | 20 +++++----- roles/mgrote.motd/handlers/main.yml | 1 + roles/mgrote.motd/meta/main.yml | 0 roles/mgrote.motd/tasks/main.yml | 5 ++- roles/mgrote.musterrolle/defaults/main.yml | 4 +- roles/mgrote.musterrolle/handlers/main.yml | 1 + roles/mgrote.musterrolle/meta/main.yml | 32 ++++++++-------- roles/mgrote.musterrolle/tasks/main.yml | 1 + roles/mgrote.musterrolle/templates/script.sh | 2 + .../handlers/main.yml | 1 + .../handlers/main.yml | 1 + roles/mgrote.postfix/handlers/main.yml | 1 + roles/mgrote.postfix/tasks/main.yml | 4 +- roles/mgrote.restic/handlers/main.yml | 0 roles/mgrote.restic/tasks/main.yml | 1 + roles/mgrote.smart/defaults/main.yml | 8 ++-- roles/mgrote.smart/handlers/main.yml | 1 + roles/mgrote.smart/meta/main.yml | 26 ++++++------- roles/mgrote.smart/tasks/main.yml | 3 +- roles/mgrote.tmux/tasks/main.yml | 1 + roles/mgrote.zfs_arc_mem/defaults/main.yml | 2 +- roles/mgrote.zfs_arc_mem/meta/main.yml | 4 +- roles/mgrote.zfs_health/defaults/main.yml | 6 +-- .../templates/sanoid-cron.sh | 11 +----- roles/mgrote.zfs_scrub/defaults/main.yml | 2 +- roles/mgrote.zfs_scrub/meta/main.yml | 4 +- roles/mgrote.zfs_zed/defaults/main.yml | 2 - roles/mgrote.zfs_zed/handlers/main.yml | 1 + roles/mgrote.zfs_zed/meta/main.yml | 6 +-- 46 files changed, 136 insertions(+), 136 deletions(-) delete mode 100644 roles/mgrote.apt_install_packages/handlers/main.yml delete mode 100644 roles/mgrote.cv4pve-autosnap/handlers/main.yml delete mode 100644 roles/mgrote.motd/meta/main.yml delete mode 100644 roles/mgrote.restic/handlers/main.yml delete mode 100644 roles/mgrote.zfs_zed/defaults/main.yml diff --git a/group_vars/all.yml b/group_vars/all.yml index 255041b5..d67f4cb7 100644 --- a/group_vars/all.yml +++ b/group_vars/all.yml @@ -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 diff --git a/roles/mgrote.acng/defaults/main.yml b/roles/mgrote.acng/defaults/main.yml index 64c7e9e2..0acfe2a4 100644 --- a/roles/mgrote.acng/defaults/main.yml +++ b/roles/mgrote.acng/defaults/main.yml @@ -1,3 +1,3 @@ --- -acng_server_exthreshold: "60" -acng_server_port: 9999 + acng_server_exthreshold: "60" + acng_server_port: 9999 diff --git a/roles/mgrote.acng/handlers/main.yml b/roles/mgrote.acng/handlers/main.yml index 27f00682..e6b6b72b 100644 --- a/roles/mgrote.acng/handlers/main.yml +++ b/roles/mgrote.acng/handlers/main.yml @@ -1,3 +1,4 @@ +--- - name: acng_starten_aktivieren become: yes systemd: diff --git a/roles/mgrote.acng/tasks/main.yml b/roles/mgrote.acng/tasks/main.yml index 45d614a4..29c8f6d0 100644 --- a/roles/mgrote.acng/tasks/main.yml +++ b/roles/mgrote.acng/tasks/main.yml @@ -1,3 +1,4 @@ +--- - name: install apt-cacher-ng packages become: yes ansible.builtin.package: diff --git a/roles/mgrote.acng/templates/acng.conf b/roles/mgrote.acng/templates/acng.conf index f7438a2d..dad5818f 100644 --- a/roles/mgrote.acng/templates/acng.conf +++ b/roles/mgrote.acng/templates/acng.conf @@ -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 diff --git a/roles/mgrote.apcupsd/handlers/main.yml b/roles/mgrote.apcupsd/handlers/main.yml index 7ac7b84b..361ea0e2 100644 --- a/roles/mgrote.apcupsd/handlers/main.yml +++ b/roles/mgrote.apcupsd/handlers/main.yml @@ -1,3 +1,4 @@ +--- - name: restart_apcupsd #wird aufgerufen wenn apcupsd.conf_kopieren nach aenderungen den status "changed hat" become: yes systemd: diff --git a/roles/mgrote.apcupsd/meta/main.yml b/roles/mgrote.apcupsd/meta/main.yml index ad9041df..56314662 100644 --- a/roles/mgrote.apcupsd/meta/main.yml +++ b/roles/mgrote.apcupsd/meta/main.yml @@ -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 diff --git a/roles/mgrote.apt_install_packages/handlers/main.yml b/roles/mgrote.apt_install_packages/handlers/main.yml deleted file mode 100644 index e69de29b..00000000 diff --git a/roles/mgrote.apt_manage_sources/templates/ubuntu_sources.list b/roles/mgrote.apt_manage_sources/templates/ubuntu_sources.list index df61d087..f3169e38 100644 --- a/roles/mgrote.apt_manage_sources/templates/ubuntu_sources.list +++ b/roles/mgrote.apt_manage_sources/templates/ubuntu_sources.list @@ -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 diff --git a/roles/mgrote.cv4pve-autosnap/handlers/main.yml b/roles/mgrote.cv4pve-autosnap/handlers/main.yml deleted file mode 100644 index 925b52cb..00000000 --- a/roles/mgrote.cv4pve-autosnap/handlers/main.yml +++ /dev/null @@ -1,6 +0,0 @@ - - name: "smbd neustarten" - become: yes - systemd: - name: smbd - enabled: yes - state: restarted diff --git a/roles/mgrote.cv4pve-autosnap/templates/cv4pve-script.sh b/roles/mgrote.cv4pve-autosnap/templates/cv4pve-script.sh index 3768fe6b..4fb751d8 100644 --- a/roles/mgrote.cv4pve-autosnap/templates/cv4pve-script.sh +++ b/roles/mgrote.cv4pve-autosnap/templates/cv4pve-script.sh @@ -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 diff --git a/roles/mgrote.dokuwiki/meta/main.yml b/roles/mgrote.dokuwiki/meta/main.yml index 8737962d..698c58af 100644 --- a/roles/mgrote.dokuwiki/meta/main.yml +++ b/roles/mgrote.dokuwiki/meta/main.yml @@ -1,3 +1,3 @@ --- -dependencies: - - role: mgrote.postfix + dependencies: + - role: mgrote.postfix diff --git a/roles/mgrote.dokuwiki/templates/000-default.conf b/roles/mgrote.dokuwiki/templates/000-default.conf index 1e34f338..30115d57 100644 --- a/roles/mgrote.dokuwiki/templates/000-default.conf +++ b/roles/mgrote.dokuwiki/templates/000-default.conf @@ -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 - + AllowOverride All Options -Indexes -MultiViews +FollowSymLinks diff --git a/roles/mgrote.ecc-rasdaemon/templates/rasdaemon-cron.sh b/roles/mgrote.ecc-rasdaemon/templates/rasdaemon-cron.sh index 2f996efa..93758694 100644 --- a/roles/mgrote.ecc-rasdaemon/templates/rasdaemon-cron.sh +++ b/roles/mgrote.ecc-rasdaemon/templates/rasdaemon-cron.sh @@ -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 diff --git a/roles/mgrote.fail2ban/meta/main.yml b/roles/mgrote.fail2ban/meta/main.yml index 8737962d..698c58af 100644 --- a/roles/mgrote.fail2ban/meta/main.yml +++ b/roles/mgrote.fail2ban/meta/main.yml @@ -1,3 +1,3 @@ --- -dependencies: - - role: mgrote.postfix + dependencies: + - role: mgrote.postfix diff --git a/roles/mgrote.fail2ban/tasks/main.yml b/roles/mgrote.fail2ban/tasks/main.yml index 3549146c..174a0bbc 100644 --- a/roles/mgrote.fail2ban/tasks/main.yml +++ b/roles/mgrote.fail2ban/tasks/main.yml @@ -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 diff --git a/roles/mgrote.fileserver_smb/handlers/main.yml b/roles/mgrote.fileserver_smb/handlers/main.yml index e4606859..02e9dc59 100644 --- a/roles/mgrote.fileserver_smb/handlers/main.yml +++ b/roles/mgrote.fileserver_smb/handlers/main.yml @@ -1,3 +1,4 @@ +--- - name: restart_smbd become: yes systemd: diff --git a/roles/mgrote.motd/defaults/main.yml b/roles/mgrote.motd/defaults/main.yml index 37927134..34204f27 100644 --- a/roles/mgrote.motd/defaults/main.yml +++ b/roles/mgrote.motd/defaults/main.yml @@ -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 diff --git a/roles/mgrote.motd/handlers/main.yml b/roles/mgrote.motd/handlers/main.yml index 4b49d064..e9795db9 100644 --- a/roles/mgrote.motd/handlers/main.yml +++ b/roles/mgrote.motd/handlers/main.yml @@ -1,3 +1,4 @@ +--- - name: Erzwinge_Aktualisierung become: yes command: update-motd diff --git a/roles/mgrote.motd/meta/main.yml b/roles/mgrote.motd/meta/main.yml deleted file mode 100644 index e69de29b..00000000 diff --git a/roles/mgrote.motd/tasks/main.yml b/roles/mgrote.motd/tasks/main.yml index f8e4bff7..67fa6870 100644 --- a/roles/mgrote.motd/tasks/main.yml +++ b/roles/mgrote.motd/tasks/main.yml @@ -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: diff --git a/roles/mgrote.musterrolle/defaults/main.yml b/roles/mgrote.musterrolle/defaults/main.yml index 64c7e9e2..0acfe2a4 100644 --- a/roles/mgrote.musterrolle/defaults/main.yml +++ b/roles/mgrote.musterrolle/defaults/main.yml @@ -1,3 +1,3 @@ --- -acng_server_exthreshold: "60" -acng_server_port: 9999 + acng_server_exthreshold: "60" + acng_server_port: 9999 diff --git a/roles/mgrote.musterrolle/handlers/main.yml b/roles/mgrote.musterrolle/handlers/main.yml index d8158f63..cd93210e 100644 --- a/roles/mgrote.musterrolle/handlers/main.yml +++ b/roles/mgrote.musterrolle/handlers/main.yml @@ -1,3 +1,4 @@ +--- - name: restart_smbd become: yes systemd: diff --git a/roles/mgrote.musterrolle/meta/main.yml b/roles/mgrote.musterrolle/meta/main.yml index d18e8191..2e3baa88 100644 --- a/roles/mgrote.musterrolle/meta/main.yml +++ b/roles/mgrote.musterrolle/meta/main.yml @@ -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 diff --git a/roles/mgrote.musterrolle/tasks/main.yml b/roles/mgrote.musterrolle/tasks/main.yml index 2354fdae..61bd90de 100644 --- a/roles/mgrote.musterrolle/tasks/main.yml +++ b/roles/mgrote.musterrolle/tasks/main.yml @@ -1,3 +1,4 @@ +--- # für scripte - name: create /etc/restic become: yes diff --git a/roles/mgrote.musterrolle/templates/script.sh b/roles/mgrote.musterrolle/templates/script.sh index 1d8d4193..dc979148 100644 --- a/roles/mgrote.musterrolle/templates/script.sh +++ b/roles/mgrote.musterrolle/templates/script.sh @@ -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 diff --git a/roles/mgrote.ntp_chrony_client/handlers/main.yml b/roles/mgrote.ntp_chrony_client/handlers/main.yml index f62bf2d0..b0edc26f 100644 --- a/roles/mgrote.ntp_chrony_client/handlers/main.yml +++ b/roles/mgrote.ntp_chrony_client/handlers/main.yml @@ -1,3 +1,4 @@ +--- - name: restart_chrony become: yes systemd: diff --git a/roles/mgrote.ntp_chrony_server/handlers/main.yml b/roles/mgrote.ntp_chrony_server/handlers/main.yml index f62bf2d0..b0edc26f 100644 --- a/roles/mgrote.ntp_chrony_server/handlers/main.yml +++ b/roles/mgrote.ntp_chrony_server/handlers/main.yml @@ -1,3 +1,4 @@ +--- - name: restart_chrony become: yes systemd: diff --git a/roles/mgrote.postfix/handlers/main.yml b/roles/mgrote.postfix/handlers/main.yml index 1c610b42..486e53a6 100644 --- a/roles/mgrote.postfix/handlers/main.yml +++ b/roles/mgrote.postfix/handlers/main.yml @@ -1,3 +1,4 @@ +--- - name: hash_sasl_passwd become: yes command: /usr/sbin/postmap hash:/etc/postfix/sasl_passwd diff --git a/roles/mgrote.postfix/tasks/main.yml b/roles/mgrote.postfix/tasks/main.yml index b4baace6..2c88cabc 100644 --- a/roles/mgrote.postfix/tasks/main.yml +++ b/roles/mgrote.postfix/tasks/main.yml @@ -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: diff --git a/roles/mgrote.restic/handlers/main.yml b/roles/mgrote.restic/handlers/main.yml deleted file mode 100644 index e69de29b..00000000 diff --git a/roles/mgrote.restic/tasks/main.yml b/roles/mgrote.restic/tasks/main.yml index 22a06b4b..e70620da 100644 --- a/roles/mgrote.restic/tasks/main.yml +++ b/roles/mgrote.restic/tasks/main.yml @@ -1,3 +1,4 @@ +--- - name: install restic-packages become: yes ansible.builtin.package: diff --git a/roles/mgrote.smart/defaults/main.yml b/roles/mgrote.smart/defaults/main.yml index 563dcc9d..53c015df 100644 --- a/roles/mgrote.smart/defaults/main.yml +++ b/roles/mgrote.smart/defaults/main.yml @@ -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" diff --git a/roles/mgrote.smart/handlers/main.yml b/roles/mgrote.smart/handlers/main.yml index 576d1318..ed4866eb 100644 --- a/roles/mgrote.smart/handlers/main.yml +++ b/roles/mgrote.smart/handlers/main.yml @@ -1,3 +1,4 @@ +--- - name: smartmontools_starten_aktivieren become: yes systemd: diff --git a/roles/mgrote.smart/meta/main.yml b/roles/mgrote.smart/meta/main.yml index 89beb0c1..f2c70d58 100644 --- a/roles/mgrote.smart/meta/main.yml +++ b/roles/mgrote.smart/meta/main.yml @@ -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 diff --git a/roles/mgrote.smart/tasks/main.yml b/roles/mgrote.smart/tasks/main.yml index cceef28e..11128f12 100644 --- a/roles/mgrote.smart/tasks/main.yml +++ b/roles/mgrote.smart/tasks/main.yml @@ -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: diff --git a/roles/mgrote.tmux/tasks/main.yml b/roles/mgrote.tmux/tasks/main.yml index 60bf4d29..fd3f674c 100644 --- a/roles/mgrote.tmux/tasks/main.yml +++ b/roles/mgrote.tmux/tasks/main.yml @@ -1,3 +1,4 @@ +--- - name: install tmux packages become: yes ansible.builtin.package: diff --git a/roles/mgrote.zfs_arc_mem/defaults/main.yml b/roles/mgrote.zfs_arc_mem/defaults/main.yml index a6e42f5d..0fcfef08 100644 --- a/roles/mgrote.zfs_arc_mem/defaults/main.yml +++ b/roles/mgrote.zfs_arc_mem/defaults/main.yml @@ -1,2 +1,2 @@ --- -zfs_extra_arc_max_size: "8589934592" #in Bytes + zfs_extra_arc_max_size: "8589934592" #in Bytes diff --git a/roles/mgrote.zfs_arc_mem/meta/main.yml b/roles/mgrote.zfs_arc_mem/meta/main.yml index 35df54ac..8c241027 100644 --- a/roles/mgrote.zfs_arc_mem/meta/main.yml +++ b/roles/mgrote.zfs_arc_mem/meta/main.yml @@ -1,3 +1,3 @@ --- -dependencies: - - role: mgrote.zfs_packages + dependencies: + - role: mgrote.zfs_packages diff --git a/roles/mgrote.zfs_health/defaults/main.yml b/roles/mgrote.zfs_health/defaults/main.yml index a153e8c3..8fc204a7 100644 --- a/roles/mgrote.zfs_health/defaults/main.yml +++ b/roles/mgrote.zfs_health/defaults/main.yml @@ -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" diff --git a/roles/mgrote.zfs_sanoid/templates/sanoid-cron.sh b/roles/mgrote.zfs_sanoid/templates/sanoid-cron.sh index 1e07279b..e7a05fa8 100644 --- a/roles/mgrote.zfs_sanoid/templates/sanoid-cron.sh +++ b/roles/mgrote.zfs_sanoid/templates/sanoid-cron.sh @@ -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 diff --git a/roles/mgrote.zfs_scrub/defaults/main.yml b/roles/mgrote.zfs_scrub/defaults/main.yml index 31569546..e453a8c3 100644 --- a/roles/mgrote.zfs_scrub/defaults/main.yml +++ b/roles/mgrote.zfs_scrub/defaults/main.yml @@ -1,2 +1,2 @@ --- -zfs_extra_path_zpool: "/usr/sbin/zpool" + zfs_extra_path_zpool: "/usr/sbin/zpool" diff --git a/roles/mgrote.zfs_scrub/meta/main.yml b/roles/mgrote.zfs_scrub/meta/main.yml index 35df54ac..8c241027 100644 --- a/roles/mgrote.zfs_scrub/meta/main.yml +++ b/roles/mgrote.zfs_scrub/meta/main.yml @@ -1,3 +1,3 @@ --- -dependencies: - - role: mgrote.zfs_packages + dependencies: + - role: mgrote.zfs_packages diff --git a/roles/mgrote.zfs_zed/defaults/main.yml b/roles/mgrote.zfs_zed/defaults/main.yml deleted file mode 100644 index 1c5b8377..00000000 --- a/roles/mgrote.zfs_zed/defaults/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- - empfaenger_mail: michael.grote@posteo.de diff --git a/roles/mgrote.zfs_zed/handlers/main.yml b/roles/mgrote.zfs_zed/handlers/main.yml index 778800fb..b9dd0034 100644 --- a/roles/mgrote.zfs_zed/handlers/main.yml +++ b/roles/mgrote.zfs_zed/handlers/main.yml @@ -1,2 +1,3 @@ +--- - name: testmail shell: echo "zed ist eingerichtet" | mail -s "{{ ansible_hostname }} - zed" {{ empfaenger_mail }} diff --git a/roles/mgrote.zfs_zed/meta/main.yml b/roles/mgrote.zfs_zed/meta/main.yml index c8caf934..873271d1 100644 --- a/roles/mgrote.zfs_zed/meta/main.yml +++ b/roles/mgrote.zfs_zed/meta/main.yml @@ -1,4 +1,4 @@ --- -dependencies: - - role: mgrote.postfix - - role: mgrote.zfs_packages + dependencies: + - role: mgrote.postfix + - role: mgrote.zfs_packages