summaryrefslogtreecommitdiff
path: root/roles/zfs/base/tasks/Debian.yml
blob: b9fdda9532b60dd966ded11d5552ecd69cfc7a23 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
---
- name: install dkms
  import_role:
    name: prepare-dkms

## TODO: make sure contrib repo is enabled

- name: install zfs-dkms
  apt:
    name: zfs-dkms
    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