2021-04-09 23:29:03 +02:00
|
|
|
---
|
|
|
|
#Blockdevice/Festplatten muessen haendisch in "templates" eingetragen werden
|
2020-08-18 11:57:53 +02:00
|
|
|
- name: smartmontools installieren
|
|
|
|
become: yes
|
2021-01-02 10:30:54 +01:00
|
|
|
ansible.builtin.package:
|
2020-08-18 11:57:53 +02:00
|
|
|
name: smartmontools
|
|
|
|
state: present
|
|
|
|
|
|
|
|
- name: smartmontools kopieren
|
|
|
|
become: yes
|
2020-11-21 19:41:19 +01:00
|
|
|
ansible.builtin.template:
|
2020-08-18 11:57:53 +02:00
|
|
|
src: "smartmontools"
|
|
|
|
dest: "/etc/default/smartmontools"
|
|
|
|
notify: smartmontools_starten_aktivieren
|
|
|
|
|
|
|
|
- name: smartd.conf kopieren
|
|
|
|
become: yes
|
2020-11-21 19:41:19 +01:00
|
|
|
ansible.builtin.template:
|
2020-08-18 11:57:53 +02:00
|
|
|
src: "smartd.conf"
|
|
|
|
dest: "/etc/smartd.conf"
|
|
|
|
notify: smartmontools_starten_aktivieren
|
|
|
|
|
|
|
|
- name: smartctl_mail.sh kopieren
|
|
|
|
become: yes
|
2020-11-21 19:41:19 +01:00
|
|
|
ansible.builtin.template:
|
2020-08-18 11:57:53 +02:00
|
|
|
src: "smartctl_mail.sh"
|
2021-02-14 10:43:53 +01:00
|
|
|
dest: "/usr/local/bin/smartctl_mail.sh"
|
2020-08-18 11:57:53 +02:00
|
|
|
mode: a+x
|
|
|
|
|
|
|
|
- name: smart_status.sh kopieren
|
|
|
|
become: yes
|
2020-11-21 19:41:19 +01:00
|
|
|
ansible.builtin.template:
|
2020-08-18 11:57:53 +02:00
|
|
|
src: "smart_status.sh"
|
|
|
|
dest: "/usr/local/bin/smart_status.sh"
|
|
|
|
mode: a+x
|
|
|
|
|
|
|
|
# smartctl output als mail
|
|
|
|
- name: cronjob fuer smartctl-mail
|
|
|
|
become: yes
|
2020-11-21 19:41:19 +01:00
|
|
|
ansible.builtin.cron:
|
2020-08-18 11:57:53 +02:00
|
|
|
name: smart-mail
|
|
|
|
state: present
|
2021-02-14 10:43:53 +01:00
|
|
|
job: "/usr/local/bin/smartctl_mail.sh"
|
2020-08-18 11:57:53 +02:00
|
|
|
minute: "{{ smart_smartctlmail_cron_minutes }}"
|
|
|
|
hour: "{{ smart_smartctlmail_cron_hours }}"
|
|
|
|
weekday: "{{ smart_smartctlmail_cron_weekday }}"
|