Installs and configures smartd with a notification script for emailing SMART disk errors.
DEVICESCAN -a -o on -S on -n standby,q -s (S/../.././02|L/../../6/03) -W 4,35,40 -m <email> -M exec /usr/local/bin/smartdnotify
This does:
- A short test every day from 2 a.m..
- A long test every Saturday at 3 a.m..
Then sends an email when SMART detects an error.
This role was tested on Fedora 27 only.
https://github.com/flyemsafe/swygue-smartd
System is configured to send emails. The notification script uses /usr/bin/mail.
See defaults/main.yml
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
- hosts: servers
roles:
- { role: swygue-smartd }
MIT
Inspiration taken from https://github.com/CSCfi/ansible-role-smartd