Skip to content

Commit 4fa8930

Browse files
authored
18.0.0 (#223)
* update .gitignore * replace ansible.builtin.yum with ansible.builtin.dnf * meta/main.yml: for opensuse only versions value of 'all' is allowed * defaults/main.yml: add noqa jinja[spacing] to ignore ansible-lint warning * removed support for CentOS 7 (reached end of life) * update README * change years * update years * removed support for Ubuntu 20.04 (reached end of life) * removed support for Fedora 39/40 (reached end of life) / added Fedora 42 * Molecule: remove openSUSE Leap 15.5 * Molecule: add Debian 13 * remove unneeded task for Ubuntu 19.10 * update year * Add support for Debian 13 * update CHANGELOG/README
1 parent 2b65ab5 commit 4fa8930

38 files changed

+98
-274
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
# Copyright (C) 2018-2024 Robert Wimmer
1+
# Copyright (C) 2018-2025 Robert Wimmer
22
# SPDX-License-Identifier: GPL-3.0-or-later
33

44
molecule/kvm/.vagrant
55
.vscode
6+
.ansible

.yamllint

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
# Copyright (C) 2018-2024 Robert Wimmer
2+
# Copyright (C) 2018-2025 Robert Wimmer
33
# SPDX-License-Identifier: GPL-3.0-or-later
44
extends: default
55

CHANGELOG.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,28 @@
11
<!--
2-
Copyright (C) 2018-2024 Robert Wimmer
2+
Copyright (C) 2018-2025 Robert Wimmer
33
SPDX-License-Identifier: GPL-3.0-or-later
44
-->
55

66
# Changelog
77

8+
## 18.0.0
9+
10+
- **BREAKING**
11+
- removed support for `CentOS 7` (reached end of life)
12+
- removed support for `Ubuntu 20.04` (reached end of life)
13+
- removed support for `Fedora 39/40` (reached end of life)
14+
- removed support for `openSUSE Leap 15.5` (reached end of life)
15+
16+
- **FEATURE**
17+
- add support for `Debian 13` (Trixie)
18+
- add support for `Fedora 42`
19+
20+
- **OTHER**
21+
- remove unneeded task for `Ubuntu 19.10`
22+
- `defaults/main.yml`: add `noqa jinja[spacing]` to ignore `ansible-lint` warning
23+
- replace `ansible.builtin.yum` with `ansible.builtin.dnf`
24+
- update `.gitignore`
25+
826
## 17.1.0
927

1028
- **FIXES**

README.md

Lines changed: 18 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
Copyright (C) 2018-2024 Robert Wimmer
2+
Copyright (C) 2018-2025 Robert Wimmer
33
Copyright (C) 2019 fbourqui
44
SPDX-License-Identifier: GPL-3.0-or-later
55
-->
@@ -16,25 +16,23 @@ In general WireGuard is a network tunnel (VPN) for IPv4 and IPv6 that uses UDP.
1616

1717
This role should work with:
1818

19-
- Ubuntu 20.04 (Focal Fossa)
2019
- Ubuntu 22.04 (Jammy Jellyfish)
2120
- Ubuntu 24.04 (Noble Numbat)
2221
- Archlinux
2322
- Debian 11 (Bullseye)
2423
- Debian 12 (Bookworm)
25-
- Fedora 39
24+
- Debian 13 (Trixie)
25+
- Fedora 42
2626
- AlmaLinux 9
2727
- Rocky Linux 9
28-
- openSUSE Leap 15.5
29-
- openSUSE Leap 15.6
28+
- openSUSE Leap
3029
- Oracle Linux 9
3130

3231
### Linux - Best effort
3332

3433
- AlmaLinux 8
3534
- Rocky Linux 8
3635
- elementary OS 6
37-
- CentOS 7 (end of life since end June 2024)
3836

3937
### MacOS
4038

@@ -70,36 +68,24 @@ See full [CHANGELOG.md](https://github.com/githubixx/ansible-role-wireguard/blob
7068

7169
**Recent changes:**
7270

73-
## 17.1.0
71+
## 18.0.0
7472

75-
- **FIXES**
76-
- add missing `wg-config` tag ([Issue #211](https://github.com/githubixx/ansible-role-wireguard/issues/211))
77-
- hide peers with empty endpoints ([Issue #101](https://github.com/githubixx/ansible-role-wireguard/issues/101) - contribution by @Miroka96)
73+
- **BREAKING**
74+
- removed support for `CentOS 7` (reached end of life)
75+
- removed support for `Ubuntu 20.04` (reached end of life)
76+
- removed support for `Fedora 39/40` (reached end of life)
77+
- removed support for `openSUSE Leap 15.5` (reached end of life)
7878

7979
- **FEATURE**
80-
- add support for `Fedora 40`
81-
- add [Netplan](https://netplan.io/) support for Ubuntu (contribution by @kbcz1989)
80+
- add support for `Debian 13` (Trixie)
81+
- add support for `Fedora 42`
8282

8383
- **OTHER**
84-
- update `.yamllint`
85-
- fix `ansible-lint` issues
84+
- remove unneeded task for `Ubuntu 19.10`
85+
- `defaults/main.yml`: add `noqa jinja[spacing]` to ignore `ansible-lint` warning
86+
- replace `ansible.builtin.yum` with `ansible.builtin.dnf`
8687
- update `.gitignore`
8788

88-
## 17.0.0
89-
90-
- **BREAKING**
91-
- removed support for `openSUSE 15.4` (reached end of life)
92-
93-
- **FEATURE**
94-
- add support for `Ubuntu 24.04`
95-
- add support for `openSUSE 15.6`
96-
97-
- **MOLECULE**
98-
- remove outdated `Proxmox` code
99-
- replace Vagrant box `rockylinux/9` with `bento/rockylinux-9`
100-
- use `ansible.builtin.package` for AlmaLinux
101-
- remove `AlmaLinux 8`, `Rocky Linux 8` and `CentOS 7` (outdated Python makes it hard to test with Ansible)
102-
10389
## Installation
10490

10591
- Directly download from Github (change into Ansible role directory before cloning):
@@ -116,7 +102,7 @@ See full [CHANGELOG.md](https://github.com/githubixx/ansible-role-wireguard/blob
116102
roles:
117103
- name: githubixx.ansible_role_wireguard
118104
src: https://github.com/githubixx/ansible-role-wireguard.git
119-
version: 17.0.0
105+
version: 18.0.0
120106
```
121107
122108
## Role Variables
@@ -231,34 +217,6 @@ wireguard_ubuntu_cache_valid_time: "3600"
231217
# Set to "true" if netplan should be used to configure WireGuard interfaces
232218
wireguard_ubuntu_use_netplan: false
233219
234-
#######################################
235-
# Settings only relevant for CentOS 7
236-
#######################################
237-
238-
# Set wireguard_centos7_installation_method to "kernel-plus"
239-
# to use the kernel-plus kernel, which includes a built-in,
240-
# signed WireGuard module.
241-
#
242-
# The default of "standard" will use the standard kernel and
243-
# the ELRepo module for WireGuard.
244-
wireguard_centos7_installation_method: "standard"
245-
246-
# Reboot host if necessary if the "kernel-plus" kernel is in use
247-
wireguard_centos7_kernel_plus_reboot: true
248-
249-
# The default seconds to wait for machine to reboot and respond
250-
# if "kernel-plus" is in use. Is only relevant if
251-
# "wireguard_centos7_kernel_plus_reboot" is set to "true".
252-
wireguard_centos7_kernel_plus_reboot_timeout: "600"
253-
254-
# Reboot host if necessary if the standard kernel is in use
255-
wireguard_centos7_standard_reboot: true
256-
257-
# The default seconds to wait for machine to reboot and respond
258-
# if "standard" kernel is in use. Is only relevant if
259-
# "wireguard_centos7_standard_reboot" is set to "true".
260-
wireguard_centos7_standard_reboot_timeout: "600"
261-
262220
#########################################
263221
# Settings only relevant for RockyLinux 8
264222
#########################################
@@ -364,7 +322,7 @@ One of `wireguard_address` (deprecated) or `wireguard_addresses` (recommended) i
364322

365323
## Example
366324

367-
Here is a litte example for what I use the playbook: I use WireGuard to setup a fully meshed VPN (every host can directly connect to every other host) and run my Kubernetes (K8s) cluster at Hetzner Cloud (but you should be able to use any hoster you want). So the important components like the K8s controller and worker nodes (which includes the pods) only communicate via encrypted WireGuard VPN. Also (as already mentioned) I've two clients. Both have `kubectl` installed and are able to talk to the internal Kubernetes API server by using WireGuard VPN. One of the two clients also exposes a WireGuard endpoint because the Postfix mailserver in the cloud and my internal Postfix needs to be able to talk to each other. I guess that's maybe a not so common use case for WireGuard :D But it shows what's possible. So let me explain the setup which might help you to use this Ansible role.
325+
Here is a little example for what I use the playbook: I use WireGuard to setup a fully meshed VPN (every host can directly connect to every other host) and run my Kubernetes (K8s) cluster at Hetzner Cloud (but you should be able to use any hoster you want). So the important components like the K8s controller and worker nodes (which includes the pods) only communicate via encrypted WireGuard VPN. Also (as already mentioned) I've two clients. Both have `kubectl` installed and are able to talk to the internal Kubernetes API server by using WireGuard VPN. One of the two clients also exposes a WireGuard endpoint because the Postfix mailserver in the cloud and my internal Postfix needs to be able to talk to each other. I guess that's maybe a not so common use case for WireGuard :D But it shows what's possible. So let me explain the setup which might help you to use this Ansible role.
368326

369327
First, here is a part of my Ansible `hosts` file:
370328

@@ -594,7 +552,7 @@ Sample playbooks for example above:
594552

595553
## Testing
596554

597-
This role has a small test setup that is created using [Molecule](https://github.com/ansible-community/molecule), libvirt (vagrant-libvirt) and QEMU/KVM. Please see my blog post [Testing Ansible roles with Molecule, libvirt (vagrant-libvirt) and QEMU/KVM](https://www.tauceti.blog/posts/testing-ansible-roles-with-molecule-libvirt-vagrant-qemu-kvm/) how to setup. The test configuration is [here](https://github.com/githubixx/ansible-role-wireguard/tree/master/molecule/default).
555+
This role has a small test setup that is created using [Molecule](https://github.com/ansible-community/molecule), libvirt (vagrant-libvirt) and QEMU/KVM. Please see my blog post [Testing Ansible roles with Molecule, libvirt (vagrant-libvirt) and QEMU/KVM](https://www.tauceti.blog/posts/testing-ansible-roles-with-molecule-libvirt-vagrant-qemu-kvm/) how to setup. The test configuration is here: [ansible-role-wireguard/molecule/default](https://github.com/githubixx/ansible-role-wireguard/tree/master/molecule/default).
598556

599557
Afterwards molecule can be executed:
600558

defaults/main.yml

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
---
2-
# Copyright (C) 2018-2024 Robert Wimmer
2+
# Copyright (C) 2018-2025 Robert Wimmer
33
# SPDX-License-Identifier: GPL-3.0-or-later
44

55
#######################################
66
# General settings
77
#######################################
88

99
# Directory to store WireGuard configuration on the remote hosts
10+
# noqa jinja[spacing]
1011
wireguard_remote_directory: >-
1112
{%- if wireguard_ubuntu_use_netplan -%}
1213
/etc/netplan
@@ -109,34 +110,6 @@ wireguard_ubuntu_cache_valid_time: "3600"
109110
# Set to "true" if you want to use netplan to configure WireGuard.
110111
wireguard_ubuntu_use_netplan: false
111112

112-
#######################################
113-
# Settings only relevant for CentOS 7
114-
#######################################
115-
116-
# Set wireguard_centos7_installation_method to "kernel-plus"
117-
# to use the kernel-plus kernel, which includes a built-in,
118-
# signed WireGuard module.
119-
#
120-
# The default of "standard" will use the standard kernel and
121-
# the ELRepo module for WireGuard.
122-
wireguard_centos7_installation_method: "standard"
123-
124-
# Reboot host if necessary if the "kernel-plus" kernel is in use
125-
wireguard_centos7_kernel_plus_reboot: true
126-
127-
# The default seconds to wait for machine to reboot and respond
128-
# if "kernel-plus" is in use. Is only relevant if
129-
# "wireguard_centos7_kernel_plus_reboot" is set to "true".
130-
wireguard_centos7_kernel_plus_reboot_timeout: "600"
131-
132-
# Reboot host if necessary if the standard kernel is in use
133-
wireguard_centos7_standard_reboot: true
134-
135-
# The default seconds to wait for machine to reboot and respond
136-
# if "standard" kernel is in use. Is only relevant if
137-
# "wireguard_centos7_standard_reboot" is set to "true".
138-
wireguard_centos7_standard_reboot_timeout: "600"
139-
140113
#########################################
141114
# Settings only relevant for RockyLinux 8
142115
#########################################

handlers/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
# Copyright (C) 2018-2024 Robert Wimmer
2+
# Copyright (C) 2018-2025 Robert Wimmer
33
# SPDX-License-Identifier: GPL-3.0-or-later
44

55
- name: Restart wireguard

meta/main.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
# Copyright (C) 2018-2024 Robert Wimmer
2+
# Copyright (C) 2018-2025 Robert Wimmer
33
# SPDX-License-Identifier: GPL-3.0-or-later
44

55
galaxy_info:
@@ -31,8 +31,7 @@ galaxy_info:
3131
- "40"
3232
- name: opensuse
3333
versions:
34-
- "15.5"
35-
- "15.6"
34+
- "all"
3635
galaxy_tags:
3736
- networking
3837
- security

molecule/default/converge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
# Copyright (C) 2020-2024 Robert Wimmer
2+
# Copyright (C) 2020-2025 Robert Wimmer
33
# SPDX-License-Identifier: GPL-3.0-or-later
44

55
- name: Setup WireGuard

molecule/default/molecule.yml

Lines changed: 9 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
# Copyright (C) 2020-2024 Robert Wimmer
3-
# Copyright (C) 2020-2024 Pierre Ozoux
2+
# Copyright (C) 2020-2025 Robert Wimmer
3+
# Copyright (C) 2020-2025 Pierre Ozoux
44
# SPDX-License-Identifier: GPL-3.0-or-later
55

66
dependency:
@@ -13,20 +13,8 @@ driver:
1313
type: libvirt
1414

1515
platforms:
16-
- name: test-wg-ubuntu2004
17-
box: alvistack/ubuntu-20.04
18-
memory: 1536
19-
cpus: 2
20-
interfaces:
21-
- auto_config: true
22-
network_name: private_network
23-
type: static
24-
ip: 172.16.10.10
25-
groups:
26-
- vpn
27-
- ubuntu
28-
- name: test-wg-fedora39
29-
box: generic/fedora39
16+
- name: test-wg-debian13
17+
box: alvistack/debian-13
3018
memory: 1536
3119
cpus: 2
3220
interfaces:
@@ -36,9 +24,9 @@ platforms:
3624
ip: 172.16.10.20
3725
groups:
3826
- vpn
39-
- fedora
40-
- name: test-wg-fedora40
41-
box: alvistack/fedora-40
27+
- debian
28+
- name: test-wg-fedora42
29+
box: alvistack/fedora-42
4230
memory: 1536
4331
cpus: 2
4432
interfaces:
@@ -121,18 +109,6 @@ platforms:
121109
groups:
122110
- vpn
123111
- ubuntu
124-
- name: test-wg-opensuse-leap-15-5
125-
box: opensuse/Leap-15.5.x86_64
126-
memory: 1536
127-
cpus: 2
128-
interfaces:
129-
- auto_config: true
130-
network_name: private_network
131-
type: static
132-
ip: 172.16.10.130
133-
groups:
134-
- vpn
135-
- opensuse
136112
- name: test-wg-rocky9
137113
box: bento/rockylinux-9
138114
memory: 1536
@@ -180,18 +156,13 @@ provisioner:
180156
name: ansible-lint
181157
inventory:
182158
host_vars:
183-
test-wg-ubuntu2004:
184-
wireguard_address: "10.10.10.10/24"
185-
wireguard_port: 51820
186-
wireguard_persistent_keepalive: "30"
187-
wireguard_endpoint: "172.16.10.10"
188-
test-wg-fedora39:
159+
test-wg-debian13:
189160
wireguard_address: "10.10.10.20/24"
190161
wireguard_port: 51820
191162
wireguard_persistent_keepalive: "30"
192163
wireguard_endpoint: "172.16.10.20"
193164
wireguard_interface_restart: true
194-
test-wg-fedora40:
165+
test-wg-fedora42:
195166
wireguard_address: "10.10.10.30/24"
196167
wireguard_port: 51820
197168
wireguard_persistent_keepalive: "30"
@@ -234,12 +205,6 @@ provisioner:
234205
wireguard_port: 51820
235206
wireguard_persistent_keepalive: "30"
236207
wireguard_endpoint: "172.16.10.120"
237-
test-wg-opensuse-leap-15-5:
238-
wireguard_address: "10.10.10.130/24"
239-
wireguard_port: 51820
240-
wireguard_persistent_keepalive: "30"
241-
wireguard_endpoint: "172.16.10.130"
242-
ansible_python_interpreter: "/usr/bin/python3.9"
243208
test-wg-rocky9:
244209
wireguard_address: "10.10.10.140/24"
245210
wireguard_port: 51820

molecule/default/prepare.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
# Copyright (C) 2021-2024 Robert Wimmer
2+
# Copyright (C) 2021-2025 Robert Wimmer
33
# SPDX-License-Identifier: GPL-3.0-or-later
44

55
- name: Prepare opensuse hosts

0 commit comments

Comments
 (0)