summaryrefslogtreecommitdiff
path: root/roles/zfs/base/tasks/Debian.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/zfs/base/tasks/Debian.yml')
-rw-r--r--roles/zfs/base/tasks/Debian.yml38
1 files changed, 13 insertions, 25 deletions
diff --git a/roles/zfs/base/tasks/Debian.yml b/roles/zfs/base/tasks/Debian.yml
index 2a3d608e..a1ed0387 100644
--- a/roles/zfs/base/tasks/Debian.yml
+++ b/roles/zfs/base/tasks/Debian.yml
@@ -10,37 +10,25 @@
- apt_repo_components is defined
- "'contrib' in apt_repo_components"
-- name: install zfs-dkms and utilities (buster)
+- name: enable backports and force ZFS packages from backports for buster
when: (ansible_distribution_major_version | int) == 10
block:
- name: add backports repo
include_role:
name: apt-repo/backports
- - name: install zfs modules via dkms
- apt:
- name: zfs-dkms
- default_release: buster-backports
- state: present
-
- - name: install zfs file system utilities
- apt:
- name: zfsutils-linux
- default_release: buster-backports
- state: present
-
-- name: install zfs-dkms and utilities (bullseye and beyond)
- when: (ansible_distribution_major_version | int) > 10
- block:
- - name: install zfs modules via dkms
- apt:
- name: zfs-dkms
- state: present
-
- - name: install zfs file system utilities
- apt:
- name: zfsutils-linux
- state: present
+ - name: pin zfs packages to buster-backports
+ copy:
+ content: |
+ Package: libnvpair1linux libuutil1linux libzfs2linux libzpool2linux spl-dkms zfs-dkms zfs-test zfsutils-linux zfsutils-linux-dev zfs-zed
+ Pin: release n=buster-backports
+ Pin-Priority: 990
+ dest: /etc/apt/preferences.d/zfs-from-buster-backports
+
+- name: install zfs modules via dkms
+ apt:
+ name: zfs-dkms
+ state: present
- name: check if module is available for the currently running kernel
command: modprobe --dry-run zfs