55 lines
1.1 KiB
YAML
55 lines
1.1 KiB
YAML
- name: Install packages
|
|
package:
|
|
name:
|
|
- linux-lts-headers
|
|
state: present
|
|
|
|
- name: Check trusted gpg keys
|
|
become_user: "{{ build_user.name }}"
|
|
command: gpg --list-public-keys --keyid-format LONG
|
|
register: gpgkeys
|
|
changed_when: false
|
|
check_mode: no
|
|
|
|
- name: Trust ZFS key
|
|
when: "item not in gpgkeys.stdout"
|
|
become_user: "{{ build_user.name }}"
|
|
command: "gpg --recv-key '{{ item }}'"
|
|
loop:
|
|
- "0AB9E991C6AF658B"
|
|
|
|
- name: Build aur packages
|
|
register: buildaur
|
|
become_user: "{{ build_user.name }}"
|
|
command: "aurutils-sync --no-view {{ item }}"
|
|
args:
|
|
creates: "/var/cache/pacman/custom/{{ item }}-*.pkg.tar.*"
|
|
loop:
|
|
- zfs-dkms
|
|
- zfs-utils
|
|
|
|
- name: Update cache
|
|
when: buildaur.changed
|
|
pacman:
|
|
name: []
|
|
state: present
|
|
update_cache: true
|
|
|
|
- name: Install packages
|
|
package:
|
|
name:
|
|
- zfs-dkms
|
|
- zfs-utils
|
|
state: present
|
|
|
|
- name: Enable services
|
|
systemd:
|
|
enabled: yes
|
|
name: "{{ item }}"
|
|
daemon_reload: yes
|
|
loop:
|
|
- zfs-import-cache.service
|
|
- zfs-mount.service
|
|
- zfs.target
|
|
- zfs-import.target
|