diff --git a/CHANGELOG.md b/CHANGELOG.md index e76d5f6..3e8c2ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/tasks/setup-debian-vanilla.yml b/tasks/setup-debian-vanilla.yml index 6a6ce06..8e94c16 100644 --- a/tasks/setup-debian-vanilla.yml +++ b/tasks/setup-debian-vanilla.yml @@ -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: