WireGuard is included in Ubuntu by default now

WireGuard is now in Ubuntu 20.04, 18.04, and 16.04 in their default
kernels, and all other Ubuntus are EOL'd by Canonical. [1] has details
on replacing the PPA with Canonical's builtin repos, which this commit
implements.

[1] https://lists.zx2c4.com/pipermail/wireguard/2020-August/005737.html
This commit is contained in:
Jason A. Donenfeld 2020-08-06 16:22:48 +02:00
parent 5fc738ba8b
commit 951524a0ae
3 changed files with 1 additions and 32 deletions

View file

@ -5,11 +5,7 @@
To connect to your AlgoVPN using [WireGuard](https://www.wireguard.com) from Ubuntu, first install WireGuard:
```shell
# Ubuntu 16.04 only: Add the WireGuard repository
sudo add-apt-repository ppa:wireguard/wireguard
sudo apt update
# Install the tools:
sudo apt update && sudo apt upgrade
sudo apt install wireguard openresolv
```

View file

@ -1,4 +0,0 @@
// Automatically upgrade packages from these (origin:archive) pairs
Unattended-Upgrade::Allowed-Origins {
"LP-PPA-wireguard-wireguard:${distro_codename}";
};

View file

@ -1,34 +1,11 @@
---
- block:
- name: WireGuard repository configured
apt_repository:
repo: ppa:wireguard/wireguard
state: present
register: result
until: result is succeeded
retries: 10
delay: 3
- name: Configure unattended-upgrades
copy:
src: 50-wireguard-unattended-upgrades
dest: /etc/apt/apt.conf.d/50-wireguard-unattended-upgrades
owner: root
group: root
mode: 0644
when: ansible_facts['distribution_version'] is version('20.04', '<')
- name: WireGuard installed
apt:
name: wireguard
state: present
update_cache: true
- name: WireGuard reload-module-on-update
file:
dest: /etc/wireguard/.reload-module-on-update
state: touch
- name: Set OS specific facts
set_fact:
service_name: "wg-quick@{{ wireguard_interface }}"