mg
e9f78f93eb
Bugfix: acng ansible.builtin.apt --> ansible.builtin.package Co-authored-by: Michael Grote <38253905+quotengrote@users.noreply.github.com> Reviewed-on: mg/ansible#20 Co-Authored-By: mg <michael.grote@posteo.de> Co-Committed-By: mg <michael.grote@posteo.de>
51 lines
1.4 KiB
YAML
51 lines
1.4 KiB
YAML
#Blockdevice/Festplatten muessen haendisch in "templates" eingetragen werden
|
|
- name: smartmontools installieren
|
|
become: yes
|
|
ansible.builtin.package:
|
|
name: smartmontools
|
|
state: present
|
|
|
|
- name: smartmontools kopieren
|
|
become: yes
|
|
ansible.builtin.template:
|
|
src: "smartmontools"
|
|
dest: "/etc/default/smartmontools"
|
|
notify: smartmontools_starten_aktivieren
|
|
|
|
- name: smartd.conf kopieren
|
|
become: yes
|
|
ansible.builtin.template:
|
|
src: "smartd.conf"
|
|
dest: "/etc/smartd.conf"
|
|
notify: smartmontools_starten_aktivieren
|
|
|
|
- name: Ordner "smart" erstellen
|
|
become: yes
|
|
ansible.builtin.file:
|
|
path: "/root/smart"
|
|
state: directory
|
|
|
|
- name: smartctl_mail.sh kopieren
|
|
become: yes
|
|
ansible.builtin.template:
|
|
src: "smartctl_mail.sh"
|
|
dest: "/root/smart/smartctl_mail.sh"
|
|
mode: a+x
|
|
|
|
- name: smart_status.sh kopieren
|
|
become: yes
|
|
ansible.builtin.template:
|
|
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
|
|
ansible.builtin.cron:
|
|
name: smart-mail
|
|
state: present
|
|
job: "/root/smart/smartctl_mail.sh"
|
|
minute: "{{ smart_smartctlmail_cron_minutes }}"
|
|
hour: "{{ smart_smartctlmail_cron_hours }}"
|
|
weekday: "{{ smart_smartctlmail_cron_weekday }}"
|