machine_setup/ansible/roles/zfs/tasks/linux.yaml
2023-04-14 17:48:40 -04:00

41 lines
749 B
YAML

- name: Install packages
package:
name:
- linux-headers
state: present
- 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