Add smartd
This commit is contained in:
@@ -29,3 +29,4 @@ ariane_logrotate: True
|
|||||||
ariane_iptables: True
|
ariane_iptables: True
|
||||||
ariane_zfs: True
|
ariane_zfs: True
|
||||||
ariane_lxc: True
|
ariane_lxc: True
|
||||||
|
ariane_smartd: True
|
||||||
|
|||||||
@@ -13,3 +13,6 @@
|
|||||||
|
|
||||||
- name: snapper - reload fstab
|
- name: snapper - reload fstab
|
||||||
command: mount -a
|
command: mount -a
|
||||||
|
|
||||||
|
- name: restart smartd
|
||||||
|
service: name=smartd state=restarted
|
||||||
|
|||||||
@@ -26,3 +26,7 @@
|
|||||||
- include_tasks: snapper.yml
|
- include_tasks: snapper.yml
|
||||||
when: ariane_snapper
|
when: ariane_snapper
|
||||||
tags: ['ariane_snapper', 'snapper']
|
tags: ['ariane_snapper', 'snapper']
|
||||||
|
|
||||||
|
- include_tasks: smartd.yml
|
||||||
|
when: ariane_smartd
|
||||||
|
tags: ['ariane_smartd', 'smartd']
|
||||||
|
|||||||
13
roles/ariane/tasks/smartd.yml
Normal file
13
roles/ariane/tasks/smartd.yml
Normal 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
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
cron:
|
cron:
|
||||||
name: zfs scrub zv1
|
name: zfs scrub zv1
|
||||||
minute: 5
|
minute: 5
|
||||||
hour: 1
|
hour: 2
|
||||||
weekday: 1
|
weekday: 1
|
||||||
job: "/sbin/zpool scrub zv1"
|
job: "/sbin/zpool scrub zv1"
|
||||||
|
|
||||||
@@ -48,6 +48,6 @@
|
|||||||
cron:
|
cron:
|
||||||
name: zfs scrub ssd
|
name: zfs scrub ssd
|
||||||
minute: 5
|
minute: 5
|
||||||
hour: 1
|
hour: 2
|
||||||
weekday: 0
|
weekday: 0
|
||||||
job: "/sbin/zpool scrub ssd"
|
job: "/sbin/zpool scrub ssd"
|
||||||
|
|||||||
Reference in New Issue
Block a user