diff --git a/playbooks/00-hosts.yml b/playbooks/00-hosts.yml index 2f58b80..8bb7e18 100644 --- a/playbooks/00-hosts.yml +++ b/playbooks/00-hosts.yml @@ -21,6 +21,7 @@ tasks: - import_tasks: tasks/hosts/systemd-mail.yml + - import_tasks: tasks/hosts/zfs-conf.yml - import_tasks: tasks/hosts/zfs-scrub.yml - import_tasks: tasks/hosts/zfs-trim.yml - import_tasks: tasks/hosts/zfs-extra.yml diff --git a/playbooks/filesystem/yggdrasil/etc/modprobe.d/zfs.conf b/playbooks/filesystem/yggdrasil/etc/modprobe.d/zfs.conf new file mode 100644 index 0000000..5a2e39e --- /dev/null +++ b/playbooks/filesystem/yggdrasil/etc/modprobe.d/zfs.conf @@ -0,0 +1 @@ +options zfs zfs_zevent_len_max=512 diff --git a/playbooks/tasks/hosts/zfs-conf.yml b/playbooks/tasks/hosts/zfs-conf.yml new file mode 100644 index 0000000..af092fe --- /dev/null +++ b/playbooks/tasks/hosts/zfs-conf.yml @@ -0,0 +1,17 @@ +- name: Configure ZFS module via modprobe.d + copy: + src: ./filesystem/{{ ansible_hostname }}/etc/modprobe.d/zfs.conf + dest: /etc/modprobe.d/zfs.conf + mode: 0644 + register: systemd_zfs_scrub_service_file + +- block: + + - name: Update initramfs + shell: update-initramfs -u -k all + + - name: Reboot + reboot: + + when: + systemd_zfs_scrub_service_file is changed