04843b5394
Arch Linux ships a Linux kernel > 5.6 and doesn't require DKMS. Move the package list variable to (distribution-specific) var files. For the Arch Linux LTS kernel (5.4) a binary wireguard-lts package is provided in [core].
24 lines
558 B
YAML
24 lines
558 B
YAML
---
|
|
- name: Install wireguard-lts package
|
|
pacman:
|
|
name: "{{ item.name }}"
|
|
state: "{{ item.state }}"
|
|
with_items:
|
|
- { name: wireguard-dkms, state: absent }
|
|
- { name: wireguard-lts, state: present }
|
|
become: yes
|
|
tags:
|
|
- wg-install
|
|
when:
|
|
- ansible_kernel is match(".*-lts$")
|
|
- ansible_kernel is version('5.6', '<')
|
|
- name: Install wireguard-dksm package
|
|
pacman:
|
|
name: wireguard-dkms
|
|
become: yes
|
|
tags:
|
|
- wg-install
|
|
when:
|
|
- not ansible_kernel is match(".*-lts$")
|
|
- ansible_kernel is version('5.6', '<')
|