3
0
Fork 0

Use wireguard from buster-backports on debian if needed (#49)

* Changes wireguard apt repo to buster-backports

* Add repo only on buster or earlier

* No apt pin needed, backports has lower priority than main distribution

* Update CHANGELOG.md

Co-Authored-By: Robert Wimmer <2039811+githubixx@users.noreply.github.com>

* Clarify effects of updating on system state

Co-authored-by: Robert Wimmer <2039811+githubixx@users.noreply.github.com>
This commit is contained in:
Ties de Kock 2020-04-28 21:01:46 +02:00 committed by GitHub
parent 9be9694553
commit 13621d4d68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 22 additions and 23 deletions

View File

@ -1,6 +1,25 @@
Changelog
---------
**6.0.4**
- Use the buster-backports repository on Debian Buster (or older), use package
standard repositories on sid/bullseye.
The role no longer adds the unstable _repo_ nor the _apt preference_ for that repo.
There is no need to clean the preference and unstable repository, since packages
from your release have a higher priority.
If you remove the apt preference (`/etc/apt/preferences.d/limit-unstable`)
updates from `unstable` are accepted by apt. This likely is not what you want
and may lead to an unstable state.
If you want to clean up:
* remove `/etc/apt/preferences.d/limit-unstable` and
* remove `deb http://deb.debian.org/debian/ unstable main` from `/etc/apt/sources.list.d/deb_debian_org_debian.list`.
The backports repository has a lower priority and does not need an apt preference.
**6.0.3**
- If `wg syncconf` command is not available do stop/start service instead of restart (contribution by @cristichiru)

View File

@ -1,3 +0,0 @@
Package: *
Pin: release a=unstable
Pin-Priority: 90

View File

@ -1,32 +1,15 @@
---
- name: Setup WireGuard preference
copy:
src: debian/etc/apt/preferences.d/limit-unstable
dest: /etc/apt/preferences.d/limit-unstable
owner: root
group: root
mode: 0644
tags:
- wg-install
- name: Install GPG - required to add wireguard key
apt:
name: gnupg
state: present
- name: Add WireGuard key
apt_key:
keyserver: "keyserver.ubuntu.com"
id: "8B48AD6246925553"
state: present
tags:
- wg-install
- name: Add WireGuard repository
- name: Add WireGuard repository on buster or earlier
apt_repository:
repo: "deb http://deb.debian.org/debian/ unstable main"
repo: "deb http://deb.debian.org/debian buster-backports main"
state: present
update_cache: yes
when: ansible_distribution_version | int <= 10
tags:
- wg-install