Switch to using dkms zfs package.

This commit is contained in:
Tom Alexander 2023-04-14 17:33:29 -04:00
parent ac914b7ff0
commit 4dba716b3e
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
2 changed files with 19 additions and 28 deletions

View File

@ -0,0 +1,3 @@
dependencies:
- users
- build

View File

@ -1,43 +1,31 @@
- name: Check trusted gpg keys
command: pacman-key -l
register: pacmankeys
changed_when: false
check_mode: no
no_log: true
- name: Install packages
package:
name:
- linux-headers
state: present
- name: Trust archzfs signing key
command: pacman-key -a -
- name: Build aur packages
register: buildaur
become_user: "{{ build_user.name }}"
command: "aurutils-sync --no-view {{ item }}"
args:
stdin: "{{ lookup('file', 'archzfs.gpg') }}"
when: '"DDF7DB817396A49B2A2723F7403BD972F75D9D76" not in pacmankeys.stdout'
register: archzfs_key_imported
- name: Sign archzfs signing key
command: pacman-key --lsign-key "DDF7DB817396A49B2A2723F7403BD972F75D9D76"
when: archzfs_key_imported.changed
- name: Additional pacman configs
register: updatepacman
copy:
src: "files/{{ item }}"
dest: /etc/pacman.d/conf.d/
mode: 0644
owner: root
group: root
creates: "/var/cache/pacman/custom/{{ item }}-*.pkg.tar.*"
loop:
- archzfs.conf
- zfs-dkms
- zfs-utils
- name: Update cache
when: updatepacman.changed
when: buildaur.changed
pacman:
name: []
state: present
update_cache: true
- name: Install packages
package:
name:
- archzfs-linux
- zfs-dkms
- zfs-utils
state: present
- name: Enable services