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

20 lines
377 B
YAML
Raw Normal View History

2020-07-26 18:03:09 +01:00
- name: Calculate ZFS ARC size
set_fact:
2020-08-18 13:47:48 +01:00
zfs_arc_size: "{{ (ansible_memtotal_mb * 1024 * 1024) * 0.2 }}"
2020-07-26 18:03:09 +01:00
- name: Enable zfs module
modprobe:
name: zfs
state: present
2020-07-26 18:22:43 +01:00
params: zfs_arc_max={{ zfs_arc_size }}
2020-07-26 18:03:09 +01:00
2020-07-26 22:17:28 +01:00
- name: ZFS Scrub
cron:
name: zfs scrub
special_time: weekly
job: zpool scrub tank
become: true
2020-07-26 22:17:28 +01:00
2020-07-26 18:03:09 +01:00
- name: Sanoid
include: sanoid.yml