Configure smartmontools
This commit is contained in:
parent
ac80331067
commit
900a72301c
28
machine.yml
28
machine.yml
@ -347,3 +347,31 @@
|
||||
state: restarted
|
||||
when:
|
||||
apcupsd_conf is changed
|
||||
|
||||
# ----------------------------------------------------------------------------------------------
|
||||
# Disk monitoring.
|
||||
# ----------------------------------------------------------------------------------------------
|
||||
|
||||
- name: Install smartmontools
|
||||
apt:
|
||||
name: smartmontools
|
||||
|
||||
- name: Smartd configuration
|
||||
copy:
|
||||
src: ./root/etc/smartd.conf
|
||||
dest: /etc/smartd.conf
|
||||
mode: 0644
|
||||
register: smartd_conf
|
||||
|
||||
- name: Enable/start smartmontools
|
||||
service:
|
||||
name: smartmontools
|
||||
enabled: yes
|
||||
state: started
|
||||
|
||||
- name: Restart smartmontools
|
||||
service:
|
||||
name: smartmontools
|
||||
state: restarted
|
||||
when:
|
||||
smartd_conf is changed
|
||||
|
@ -1,9 +0,0 @@
|
||||
# Defaults for smartmontools initscript (/etc/init.d/smartmontools)
|
||||
# This is a POSIX shell fragment
|
||||
|
||||
# List of devices you want to explicitly enable S.M.A.R.T. for
|
||||
# Not needed (and not recommended) if the device is monitored by smartd
|
||||
#enable_smart="/dev/hda /dev/hdb"
|
||||
|
||||
# uncomment to pass additional options to smartd on startup
|
||||
#smartd_opts="--interval=1800"
|
@ -18,7 +18,7 @@
|
||||
# Directives listed below, which will be applied to all devices that
|
||||
# are found. Most users should comment out DEVICESCAN and explicitly
|
||||
# list the devices that they wish to monitor.
|
||||
DEVICESCAN -d removable -n standby -m root -M exec /usr/share/smartmontools/smartd-runner
|
||||
#DEVICESCAN -d removable -n standby -m root -M exec /usr/share/smartmontools/smartd-runner
|
||||
|
||||
# Alternative setting to ignore temperature and power-on hours reports
|
||||
# in syslog.
|
||||
@ -147,3 +147,8 @@ DEVICESCAN -d removable -n standby -m root -M exec /usr/share/smartmontools/smar
|
||||
# If the test string DEVICESCAN is the first uncommented text
|
||||
# then smartd will scan for devices.
|
||||
# DEVICESCAN may be followed by any desired Directives.
|
||||
|
||||
/dev/sda -a -o on -S on -s (S/../../4/04|L/../14/./06) -m root -M exec /usr/share/smartmontools/smartd-runner -M test
|
||||
/dev/sdb -a -o on -S on -s (S/../../5/04|L/../15/./06) -m root -M exec /usr/share/smartmontools/smartd-runner -M test
|
||||
/dev/sdc -a -o on -S on -s (S/../../4/04|L/../14/./06) -m root -M exec /usr/share/smartmontools/smartd-runner -M test
|
||||
/dev/sdd -a -o on -S on -s (S/../../5/04|L/../15/./06) -m root -M exec /usr/share/smartmontools/smartd-runner -M test
|
||||
|
Loading…
Reference in New Issue
Block a user