From 0bcbb2cc5a0dcb7c59d4709b6223967cf3507fdc Mon Sep 17 00:00:00 2001 From: Ties de Kock Date: Wed, 30 Jan 2019 18:08:38 +0100 Subject: [PATCH] Install kernel headers on debian There is no equivalent package of linux-headers-generic on debian. Package installation needs to specify the architecture (i.e. amd64), which is captured from dpkg output. --- tasks/setup-debian.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tasks/setup-debian.yml b/tasks/setup-debian.yml index 8171760..940554c 100644 --- a/tasks/setup-debian.yml +++ b/tasks/setup-debian.yml @@ -24,3 +24,14 @@ update_cache: yes tags: - wg-install + +- name: Get architecture + shell: dpkg --print-architecture + register: dpkg_arch + changed_when: "0 != 0" + +- name: Install kernel headers to compile wireguard with DKMS + apt: + name: + - "linux-headers-{{ dpkg_arch.stdout }}" + state: present