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-09 20:52:51 +00:00
|
|
|
name: zfs scrub {{ item }}
|
2020-07-26 22:17:28 +01:00
|
|
|
special_time: weekly
|
2021-01-09 20:52:51 +00: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
|
|
|
|
include: sanoid.yml
|