From fad7b1d7b0f15cfb8a9282a14c5f40285331d40c Mon Sep 17 00:00:00 2001 From: Robert Wimmer <2039811+githubixx@users.noreply.github.com> Date: Wed, 18 May 2022 22:14:44 +0200 Subject: [PATCH] Support Ubuntu 22.04 (Jammy Jellyfish) (#159) * add Ubuntu 22.04 (Jammy Jellyfish) support * update README --- CHANGELOG.md | 4 ++++ README.md | 30 ++++++++++++++++++++++--- meta/main.yml | 1 + molecule/kvm-single-server/molecule.yml | 14 ++++++++++++ molecule/kvm/molecule.yml | 16 +++++++++++++ 5 files changed, 62 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 79f44c8..8dc9d0e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ SPDX-License-Identifier: GPL-3.0-or-later # Changelog +## 9.3.0 + +- add support for Ubuntu 22.04 (Jammy Jellyfish) + ## 9.2.0 - add `wireguard_interface_restart` variable. This allows the user to decide if the WireGuard interface should be restarted or not in case of changes to the interface. The default is (and was) to use `wg syncconf` which applies the changes to the interface without the need to restart the interface. Restarting the interface was only done if `wg`'s `syncconf` command wasn't available. But that's basically only true for very old (and outdated) WireGuard tools. For more information on this have a look at the README (initial [PR](https://github.com/githubixx/ansible-role-wireguard/pull/152) by @lmm-git) diff --git a/README.md b/README.md index d1080d8..2194472 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ @@ -14,7 +14,21 @@ In general WireGuard is a network tunnel (VPN) for IPv4 and IPv6 that uses UDP. Linux ----- -This role is mainly tested with Ubuntu 20.04 (Focal Fossa) and Archlinux. Ubuntu 18.04 (Bionic Beaver), Debian 10 (Buster), Debian 11 (Bullseye), Fedora 34 (or later), CentOS 7, AlmaLinux, Rocky Linux and openSUSE Leap 15.3 should also work and are tested via the provided [Molecule tests](https://github.com/githubixx/ansible-role-wireguard#testing) (see further down below). It should also work with `Raspbian Buster` but for this one there is no test available. MacOS (see below) should also work partitially but is only best effort. +This role should work with: + +- Ubuntu 18.04 (Bionic Beaver) +- Ubuntu 20.04 (Focal Fossa) +- Ubuntu 22.04 (Jammy Jellyfish) +- Archlinux +- Debian 10 (Buster) +- Debian 11 (Bullseye) +- Fedora 34 (or later) +- CentOS 7 +- AlmaLinux +- Rocky Linux +- openSUSE Leap 15.3 + +Molecule tests are [available](https://github.com/githubixx/ansible-role-wireguard#testing) (see further down below). It should also work with `Raspbian Buster` but for this one there is no test available. MacOS (see below) should also work partitially but is only best effort. MacOS ----- @@ -478,7 +492,11 @@ Afterwards molecule can be executed: molecule converge -s kvm ``` -This will setup quite a few virtual machines (VM) with different supported Linux operating systems. +This will setup quite a few virtual machines (VM) with different supported Linux operating systems. To run a few tests: + +```bash +molecule verify -s kvm +``` To clean up run @@ -486,6 +504,12 @@ To clean up run molecule destroy -s kvm ``` +There is also a small Molecule setup that mimics a central WireGuard server with a few clients: + +```bash +molecule converge -s kvm-single-server +``` + License ------- diff --git a/meta/main.yml b/meta/main.yml index 373d597..15e4611 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -14,6 +14,7 @@ galaxy_info: versions: - "bionic" - "focal" + - "jammy" - name: Debian versions: - "buster" diff --git a/molecule/kvm-single-server/molecule.yml b/molecule/kvm-single-server/molecule.yml index 4916d72..2494d05 100644 --- a/molecule/kvm-single-server/molecule.yml +++ b/molecule/kvm-single-server/molecule.yml @@ -45,6 +45,16 @@ platforms: groups: - vpn - debian + - name: test-wg-ubuntu2204 + box: alvistack/ubuntu-22.04 + interfaces: + - auto_config: true + network_name: private_network + type: static + ip: 192.168.10.40 + groups: + - vpn + - ubuntu provisioner: name: ansible @@ -70,6 +80,10 @@ provisioner: wireguard_persistent_keepalive: "30" wireguard_endpoint: "" ansible_python_interpreter: "/usr/bin/python3" + test-wg-ubuntu2204: + wireguard_address: "10.10.10.40/24" + wireguard_persistent_keepalive: "30" + wireguard_endpoint: "" scenario: name: kvm-single-server diff --git a/molecule/kvm/molecule.yml b/molecule/kvm/molecule.yml index 3cd47c2..4e50630 100644 --- a/molecule/kvm/molecule.yml +++ b/molecule/kvm/molecule.yml @@ -147,6 +147,17 @@ platforms: - vpn - el8 - el8dkms + - name: test-wg-ubuntu2204 + box: alvistack/ubuntu-22.04 + interfaces: + - auto_config: true + network_name: private_network + type: static + ip: 192.168.10.140 + groups: + - vpn + - ubuntu + provisioner: name: ansible @@ -230,6 +241,11 @@ provisioner: wireguard_persistent_keepalive: "30" wireguard_endpoint: "192.168.10.130" wireguard_rockylinux8_installation_method: "dkms" + test-wg-ubuntu2204: + wireguard_address: "10.10.10.140/24" + wireguard_port: 51820 + wireguard_persistent_keepalive: "30" + wireguard_endpoint: "192.168.10.140" scenario: name: kvm