infrastructure/ansible/roles/zfs/tasks/main.yml
2021-01-09 21:36:09 +00:00

23 lines
494 B
YAML

- name: Enable zfs module
modprobe:
name: zfs
state: present
params: zfs_arc_max={{ zfs_arc_size }}
- name: ZFS Scrub
cron:
name: zfs scrub {{ item }}
special_time: weekly
job: 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