--- ## TODO: @debian: make sure contrib repo is added - name: install zfs packages apt: name: - zfs-dkms - zfsutils-linux state: present - name: check if module is available for the currently running kernel command: modprobe --dry-run zfs check_mode: no register: zfs_module_available failed_when: false changed_when: false - name: rebuild zfs module when: zfs_module_available.rc != 0 command: dpkg-reconfigure zfs-dkms - name: check again if module is available for the currently running kernel when: zfs_module_available.rc != 0 command: modprobe --dry-run zfs check_mode: no changed_when: false