2018-08-12 20:21:45 +00:00
|
|
|
---
|
2019-11-11 18:56:10 +00:00
|
|
|
- name: Install GPG - required to add wireguard key
|
|
|
|
apt:
|
2020-03-18 19:12:19 +00:00
|
|
|
name: gnupg
|
2019-11-11 18:56:10 +00:00
|
|
|
state: present
|
|
|
|
|
2020-04-28 19:01:46 +00:00
|
|
|
- name: Add WireGuard repository on buster or earlier
|
2018-08-12 20:21:45 +00:00
|
|
|
apt_repository:
|
2020-04-28 19:01:46 +00:00
|
|
|
repo: "deb http://deb.debian.org/debian buster-backports main"
|
2018-08-12 20:21:45 +00:00
|
|
|
state: present
|
|
|
|
update_cache: yes
|
2020-04-28 19:01:46 +00:00
|
|
|
when: ansible_distribution_version | int <= 10
|
2019-01-07 21:49:06 +00:00
|
|
|
tags:
|
2018-08-12 20:21:45 +00:00
|
|
|
- wg-install
|
2019-02-06 19:56:06 +00:00
|
|
|
|
|
|
|
- name: Get architecture
|
|
|
|
shell: dpkg --print-architecture
|
|
|
|
register: dpkg_arch
|
|
|
|
changed_when: False
|
|
|
|
|
|
|
|
- name: Install kernel headers to compile wireguard with DKMS
|
|
|
|
apt:
|
|
|
|
name:
|
|
|
|
- "linux-headers-{{ dpkg_arch.stdout }}"
|
|
|
|
state: present
|