This repository has been archived on 2020-08-04. You can view files and clone it, but cannot push or open issues or pull requests.
2020-06-04 21:17:25 +00:00
|
|
|
---
|
|
|
|
- name: (Debian) Install GPG - required to add wireguard key
|
|
|
|
apt:
|
|
|
|
name: gnupg
|
|
|
|
state: present
|
|
|
|
|
|
|
|
- name: (Debian) Add WireGuard repository on buster or earlier
|
|
|
|
apt_repository:
|
|
|
|
repo: "deb http://deb.debian.org/debian buster-backports main"
|
|
|
|
state: present
|
|
|
|
update_cache: yes
|
|
|
|
when: ansible_distribution_version | int <= 10
|
|
|
|
tags:
|
|
|
|
- wg-install
|
|
|
|
|
|
|
|
- name: (Debian) Get architecture
|
|
|
|
command: "dpkg --print-architecture"
|
|
|
|
register: dpkg_arch
|
|
|
|
changed_when: False
|
|
|
|
|
2020-06-14 15:52:17 +00:00
|
|
|
- set_fact:
|
|
|
|
kernel_header_version: "{{ ('-cloud-' in ansible_kernel) | ternary(ansible_kernel,dpkg_arch.stdout) }}"
|
|
|
|
|
2020-06-04 21:17:25 +00:00
|
|
|
- name: (Debian) Install kernel headers to compile Wireguard with DKMS
|
|
|
|
apt:
|
|
|
|
name:
|
2020-06-14 15:52:17 +00:00
|
|
|
- "linux-headers-{{ kernel_header_version }}"
|
2020-06-04 21:17:25 +00:00
|
|
|
state: present
|
|
|
|
|
|
|
|
- name: (Debian) Install wireguard packages
|
|
|
|
apt:
|
|
|
|
name:
|
|
|
|
- "wireguard-dkms"
|
|
|
|
- "wireguard-tools"
|
|
|
|
state: present
|
|
|
|
tags:
|
|
|
|
- wg-install
|