Add smartd

This commit is contained in:
Daniel A. Maierhofer
2018-03-17 14:18:49 +01:00
parent 15eaf1b443
commit a983059a41
5 changed files with 23 additions and 2 deletions

View File

@@ -29,3 +29,4 @@ ariane_logrotate: True
ariane_iptables: True
ariane_zfs: True
ariane_lxc: True
ariane_smartd: True

View File

@@ -13,3 +13,6 @@
- name: snapper - reload fstab
command: mount -a
- name: restart smartd
service: name=smartd state=restarted

View File

@@ -26,3 +26,7 @@
- include_tasks: snapper.yml
when: ariane_snapper
tags: ['ariane_snapper', 'snapper']
- include_tasks: smartd.yml
when: ariane_smartd
tags: ['ariane_smartd', 'smartd']

View File

@@ -0,0 +1,13 @@
---
- name: smartd - /etc/default/smartmontools
replace:
path: /etc/default/smartmontools
regexp: "^#start_smartd=.*"
replace: "start_smartd=yes"
notify: restart smartd
- name: smartd - /etc/smartd.conf
copy:
dest: /etc/smartd.conf
content: "DEVICESCAN -a -d nvme -d sat -o on -s (S/../.././01) -n standby -R 5 -I 9 -R 194 -m root -M exec /usr/share/smartmontools/smartd-runner\n"
notify: restart smartd

View File

@@ -40,7 +40,7 @@
cron:
name: zfs scrub zv1
minute: 5
hour: 1
hour: 2
weekday: 1
job: "/sbin/zpool scrub zv1"
@@ -48,6 +48,6 @@
cron:
name: zfs scrub ssd
minute: 5
hour: 1
hour: 2
weekday: 0
job: "/sbin/zpool scrub ssd"