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

26 lines
549 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:
name: scrub {{ item }} ZFS pool
hour: 2
2021-05-30 13:55:44 +01:00
minute: 0
weekday: 5
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: "{{ me.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