Merge pull request #77 from ypid/fix/62

Debian only: Ensure DKMS builds for the currently running kernel
master 7.3.1
Robert Wimmer 4 years ago committed by GitHub
commit 4db85a4fda
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,6 +1,10 @@
Changelog
---------
**7.3.1**
- Debian only: Ensure the headers for the currently running kernel are installed instead of the latest one which might not be running yet. This allows DKMS to build the module for the current kernel version and avoids the need for an reboot to load the module. (contribution by @ldelelis and @ypid)
**7.3.0**
- Fix spelling and typos in docs. (contribution by @ypid)

@ -7,16 +7,23 @@
tags:
- wg-install
- name: (Debian) Install kernel headers for the currently running kernel to compile Wireguard with DKMS
apt:
name:
- "linux-headers-{{ ansible_kernel }}"
state: present
- name: (Debian) Get architecture
command: "dpkg --print-architecture"
register: wireguard__fact_dpkg_arch
changed_when: False
- name: (Debian) Install kernel headers to compile Wireguard with DKMS
- name: (Debian) Install kernel headers metapackage to ensure headers will be installed
apt:
name:
- "linux-headers-{{ ('-cloud-' in ansible_kernel) | ternary(ansible_kernel,wireguard__fact_dpkg_arch.stdout) }}"
- "linux-headers-{{ wireguard__fact_dpkg_arch.stdout }}"
state: present
when: ('-cloud-' not in ansible_kernel)
- name: (Debian) Install WireGuard packages
apt:

Loading…
Cancel
Save