diff --git a/ansible/roles/zfs/files/zfs-modprobe.conf b/ansible/roles/zfs/files/zfs-modprobe.conf new file mode 100644 index 0000000..d40f2ed --- /dev/null +++ b/ansible/roles/zfs/files/zfs-modprobe.conf @@ -0,0 +1 @@ +options zfs zfs_arc_max={{ zfs_arc_size }} diff --git a/ansible/roles/zfs/tasks/main.yml b/ansible/roles/zfs/tasks/main.yml index 635d425..f170ca3 100644 --- a/ansible/roles/zfs/tasks/main.yml +++ b/ansible/roles/zfs/tasks/main.yml @@ -1,8 +1,9 @@ -- name: Enable zfs module - modprobe: - name: zfs - state: present - params: zfs_arc_max={{ zfs_arc_size }} +- name: Set module options + template: + src: files/zfs-modprobe.conf + dest: /etc/modprobe.d/zfs.conf + mode: "0644" + become: true - name: ZFS Scrub cron: