infrastructure/ansible/roles/zfs/tasks/main.yml
Jake Howard cc847a069c
Resolve zpool location
Hopefully this means they actually run
2021-01-22 15:29:41 +00:00

23 lines
556 B
YAML

- name: Set module options
template:
src: files/zfs-modprobe.conf
dest: /etc/modprobe.d/zfs.conf
mode: "0644"
become: true
- name: ZFS Scrub
cron:
name: scrub {{ item }} ZFS pool
special_time: weekly
job: "{{ lookup('pipe', 'which zpool') }} scrub {{ item }}"
become: true
loop: "{{ zpools_to_scrub }}"
- 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
- name: Sanoid
include: sanoid.yml