🚀: new NAS
This commit is contained in:
29
roles/zfs/tasks/main.yml
Normal file
29
roles/zfs/tasks/main.yml
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
|
||||
- name: Install Backports
|
||||
ansible.builtin.template:
|
||||
src: "backports.list.j2"
|
||||
dest: "/etc/apt/sources.list.d/{{ ansible_distribution_release }}-backports.list"
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0o640"
|
||||
|
||||
- name: Pin ZFS
|
||||
ansible.builtin.template:
|
||||
src: "90_zfs.j2"
|
||||
dest: "/etc/apt/preferences.d/90_zfs"
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0o640"
|
||||
|
||||
- name: Install ZFS
|
||||
ansible.builtin.apt:
|
||||
name: "{{ item }}"
|
||||
state: present
|
||||
update_cache: true
|
||||
loop:
|
||||
- dpkg-dev
|
||||
- linux-headers-generic
|
||||
- linux-image-generic
|
||||
- zfs-dkms
|
||||
- zfsutils-linux
|
3
roles/zfs/templates/90_zfs.j2
Normal file
3
roles/zfs/templates/90_zfs.j2
Normal file
@@ -0,0 +1,3 @@
|
||||
Package: src:zfs-linux
|
||||
Pin: release n={{ ansible_distribution_release }}-backports
|
||||
Pin-Priority: 990
|
2
roles/zfs/templates/backports.list.j2
Normal file
2
roles/zfs/templates/backports.list.j2
Normal file
@@ -0,0 +1,2 @@
|
||||
deb http://deb.debian.org/debian {{ ansible_distribution_release }}-backports main contrib
|
||||
deb-src http://deb.debian.org/debian {{ ansible_distribution_release }}-backports main contrib
|
Reference in New Issue
Block a user