- 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)
- 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)
@ -14,7 +14,21 @@ In general WireGuard is a network tunnel (VPN) for IPv4 and IPv6 that uses UDP.
Linux
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
MacOS
-----
-----
@ -478,7 +492,11 @@ Afterwards molecule can be executed:
molecule converge -s kvm
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
To clean up run
@ -486,6 +504,12 @@ To clean up run
molecule destroy -s kvm
molecule destroy -s kvm
```
```
There is also a small Molecule setup that mimics a central WireGuard server with a few clients: