From f4573c5e8f873d04dd5497f3e5989bdecedd6f0f Mon Sep 17 00:00:00 2001 From: Robert Wimmer <2039811+githubixx@users.noreply.github.com> Date: Mon, 14 Nov 2022 23:46:35 +0100 Subject: [PATCH] Rocky Linux + AlmaLinux support (#168) * add EL9 to meta/main.yml * require Ansible >= 2.11 as Rocky Linux is only supported with this version or above * ansible-lint: use community.general.pacman module instead of ansible.builtin.pacman for Archlinux setup * add support for Rocky Linux 9 and AlmaLinux 9 * add openSUSE Leap 15.4 to README.md * update CHANGELOG.md --- CHANGELOG.md | 8 ++++++++ README.md | 1 + meta/main.yml | 3 ++- molecule/kvm/molecule.yml | 34 ++++++++++++++++++++++++++++++++++ tasks/setup-almalinux.yml | 8 ++++++++ tasks/setup-archlinux.yml | 2 +- tasks/setup-rocky.yml | 8 ++++++++ 7 files changed, 62 insertions(+), 2 deletions(-) create mode 100644 tasks/setup-almalinux.yml create mode 100644 tasks/setup-rocky.yml diff --git a/CHANGELOG.md b/CHANGELOG.md index 37abeaf..67f47a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,14 @@ SPDX-License-Identifier: GPL-3.0-or-later # Changelog +## 11.0.0 + +- add support for Rocky Linux 9 (original PR from @vincentDcmps: https://github.com/githubixx/ansible-role-wireguard/pull/163) +- add support for AlamaLinux 9 (original PR from @trunet: https://github.com/githubixx/ansible-role-wireguard/pull/164) +- add `EL9` to `meta/main.yml` +- require Ansible >= `2.11` as Rocky Linux is only supported with this version or above +- `ansible-lint`: use `community.general.pacman` module instead of `ansible.builtin.pacman` for Archlinux setup + ## 10.0.0 - remove Fedora 34 + add Fedora 36 to Molecule test diff --git a/README.md b/README.md index 2194472..4578a0d 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,7 @@ This role should work with: - AlmaLinux - Rocky Linux - openSUSE Leap 15.3 +- openSUSE Leap 15.4 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. diff --git a/meta/main.yml b/meta/main.yml index 93c4af7..1b7e8a0 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -6,7 +6,7 @@ galaxy_info: author: Robert Wimmer description: Installs Wireguard incl. systemd integration license: GPL-3.0-or-later - min_ansible_version: "2.9" + min_ansible_version: "2.11" namespace: githubixx role_name: ansible_role_wireguard platforms: @@ -24,6 +24,7 @@ galaxy_info: versions: - "7" - "8" + - "9" - name: Fedora versions: - "35" diff --git a/molecule/kvm/molecule.yml b/molecule/kvm/molecule.yml index a76e470..211539d 100644 --- a/molecule/kvm/molecule.yml +++ b/molecule/kvm/molecule.yml @@ -194,6 +194,30 @@ platforms: groups: - vpn - opensuse + - name: test-wg-rocky9 + box: generic/rocky9 + memory: 1024 + cpus: 2 + interfaces: + - auto_config: true + network_name: private_network + type: static + ip: 192.168.10.160 + groups: + - vpn + - el9 + - name: test-wg-alma9 + box: generic/alma9 + memory: 1024 + cpus: 2 + interfaces: + - auto_config: true + network_name: private_network + type: static + ip: 192.168.10.170 + groups: + - vpn + - el9 provisioner: name: ansible @@ -287,6 +311,16 @@ provisioner: wireguard_port: 51820 wireguard_persistent_keepalive: "30" wireguard_endpoint: "192.168.10.150" + test-wg-rocky9: + wireguard_address: "10.10.10.160/24" + wireguard_port: 51820 + wireguard_persistent_keepalive: "30" + wireguard_endpoint: "192.168.10.160" + test-wg-alma9: + wireguard_address: "10.10.10.170/24" + wireguard_port: 51820 + wireguard_persistent_keepalive: "30" + wireguard_endpoint: "192.168.10.170" scenario: name: kvm diff --git a/tasks/setup-almalinux.yml b/tasks/setup-almalinux.yml new file mode 100644 index 0000000..0dcc688 --- /dev/null +++ b/tasks/setup-almalinux.yml @@ -0,0 +1,8 @@ +--- +# Copyright (C) 2022 Robert Wimmer +# SPDX-License-Identifier: GPL-3.0-or-later + +- name: (AlmaLinux) Install wireguard-tools package + ansible.builtin.yum: + name: wireguard-tools + state: present diff --git a/tasks/setup-archlinux.yml b/tasks/setup-archlinux.yml index 354f930..47021b2 100644 --- a/tasks/setup-archlinux.yml +++ b/tasks/setup-archlinux.yml @@ -3,6 +3,6 @@ # SPDX-License-Identifier: GPL-3.0-or-later - name: (Archlinux) Install wireguard-tools package - ansible.builtin.pacman: + community.general.pacman: name: wireguard-tools state: present diff --git a/tasks/setup-rocky.yml b/tasks/setup-rocky.yml new file mode 100644 index 0000000..3743dbc --- /dev/null +++ b/tasks/setup-rocky.yml @@ -0,0 +1,8 @@ +--- +# Copyright (C) 2022 Robert Wimmer +# SPDX-License-Identifier: GPL-3.0-or-later + +- name: (Rocky Linux) Install wireguard-tools package + ansible.builtin.yum: + name: wireguard-tools + state: present