infrastructure/ansible/roles/zfs/tasks/main.yml

24 lines
519 B
YAML
Raw Normal View History

- 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 }}
become: true
2021-01-09 20:52:51 +00:00
loop: "{{ zpools_to_scrub }}"
2020-07-26 22:17:28 +01: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