2023-04-14 21:33:29 +00:00
|
|
|
- name: Install packages
|
|
|
|
package:
|
|
|
|
name:
|
2023-05-26 16:12:43 +00:00
|
|
|
- linux-lts-headers
|
2023-04-14 21:33:29 +00:00
|
|
|
state: present
|
2023-03-03 17:20:47 +00:00
|
|
|
|
2023-10-27 00:40:12 +00:00
|
|
|
- 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"
|
2023-11-26 14:31:32 +00:00
|
|
|
- "6AD860EED4598027"
|
2023-10-27 00:40:12 +00:00
|
|
|
|
2023-04-14 21:33:29 +00:00
|
|
|
- name: Build aur packages
|
|
|
|
register: buildaur
|
|
|
|
become_user: "{{ build_user.name }}"
|
|
|
|
command: "aurutils-sync --no-view {{ item }}"
|
2023-03-03 17:20:47 +00:00
|
|
|
args:
|
2023-04-14 21:33:29 +00:00
|
|
|
creates: "/var/cache/pacman/custom/{{ item }}-*.pkg.tar.*"
|
2023-03-03 17:20:47 +00:00
|
|
|
loop:
|
2023-04-14 21:33:29 +00:00
|
|
|
- zfs-dkms
|
|
|
|
- zfs-utils
|
2023-03-03 17:20:47 +00:00
|
|
|
|
|
|
|
- name: Update cache
|
2023-04-14 21:33:29 +00:00
|
|
|
when: buildaur.changed
|
2023-03-03 17:20:47 +00:00
|
|
|
pacman:
|
|
|
|
name: []
|
|
|
|
state: present
|
|
|
|
update_cache: true
|
2023-04-14 21:33:29 +00:00
|
|
|
|
2023-03-03 17:20:47 +00:00
|
|
|
- name: Install packages
|
|
|
|
package:
|
|
|
|
name:
|
2023-04-14 21:33:29 +00:00
|
|
|
- zfs-dkms
|
|
|
|
- zfs-utils
|
2023-03-03 17:20:47 +00:00
|
|
|
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
|
2024-04-28 16:53:25 +00:00
|
|
|
|
|
|
|
- name: Enable periodic scrub
|
|
|
|
when: periodic_scrub_pools is defined
|
|
|
|
systemd:
|
|
|
|
enabled: yes
|
|
|
|
name: "zfs-scrub-weekly@{{ item }}.timer"
|
|
|
|
daemon_reload: yes
|
|
|
|
loop: "{{ periodic_scrub_pools }}"
|