2021-01-09 22:25:29 +00:00
|
|
|
- name: Set module options
|
|
|
|
template:
|
|
|
|
src: files/zfs-modprobe.conf
|
|
|
|
dest: /etc/modprobe.d/zfs.conf
|
|
|
|
mode: "0644"
|
|
|
|
become: true
|
2020-07-26 18:03:09 +01:00
|
|
|
|
2020-07-26 22:17:28 +01:00
|
|
|
- name: ZFS Scrub
|
|
|
|
cron:
|
2021-01-22 15:29:41 +00:00
|
|
|
name: scrub {{ item }} ZFS pool
|
2021-05-30 13:55:44 +01:00
|
|
|
hour: 5
|
|
|
|
minute: 0
|
|
|
|
weekday: 5
|
2021-06-25 20:57:19 +01:00
|
|
|
job: zpool scrub {{ item }}
|
2020-08-17 22:29:02 +01:00
|
|
|
become: true
|
2021-01-09 20:52:51 +00:00
|
|
|
loop: "{{ zpools_to_scrub }}"
|
2020-07-26 22:17:28 +01:00
|
|
|
|
2021-01-09 21:36:09 +00:00
|
|
|
- name: Give user passwordless access to ZFS commands
|
|
|
|
lineinfile:
|
|
|
|
path: /etc/sudoers
|
|
|
|
line: "{{ user }} ALL=(ALL) NOPASSWD: /usr/sbin/zfs,/usr/sbin/zpool"
|
|
|
|
become: true
|
|
|
|
|
2020-07-26 18:03:09 +01:00
|
|
|
- name: Sanoid
|
2022-01-22 20:21:32 +00:00
|
|
|
include_tasks: sanoid.yml
|