From 1997b9d710e3c084c694b1e092eaf9379ce44455 Mon Sep 17 00:00:00 2001 From: pallinger Date: Sun, 14 Jun 2020 17:52:17 +0200 Subject: [PATCH] Fix on debian openstack images (#55) * on openstack Debian images, the kernel is different, so we need to install different kernel headers, too * fix syntax error in conditional fact * remove debug message Co-authored-by: Peter Pallinger --- tasks/setup-debian-vanilla.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tasks/setup-debian-vanilla.yml b/tasks/setup-debian-vanilla.yml index d874d65..0b6aa0b 100644 --- a/tasks/setup-debian-vanilla.yml +++ b/tasks/setup-debian-vanilla.yml @@ -18,10 +18,13 @@ register: dpkg_arch changed_when: False +- set_fact: + kernel_header_version: "{{ ('-cloud-' in ansible_kernel) | ternary(ansible_kernel,dpkg_arch.stdout) }}" + - name: (Debian) Install kernel headers to compile Wireguard with DKMS apt: name: - - "linux-headers-{{ dpkg_arch.stdout }}" + - "linux-headers-{{ kernel_header_version }}" state: present - name: (Debian) Install wireguard packages