From b7d9f987d081fbb3ec1f35effcca686441adaffd Mon Sep 17 00:00:00 2001 From: ace Date: Wed, 13 Jul 2022 18:09:24 +0300 Subject: [PATCH] split wireguard install for el8 and el9 --- tasks/RedHat/wireguard_install.yaml | 34 +++++++++++++++++++---------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/tasks/RedHat/wireguard_install.yaml b/tasks/RedHat/wireguard_install.yaml index 0e27440..b39d97d 100644 --- a/tasks/RedHat/wireguard_install.yaml +++ b/tasks/RedHat/wireguard_install.yaml @@ -1,15 +1,27 @@ -- name: Install repos - dnf: - name: - - elrepo-release - - epel-release - state: present +- name: Install wireguard for RHEL 8 + when: distribution_major_version == '8' + block: + - name: Install repos + dnf: + name: + - elrepo-release + - epel-release + state: present -- name: Install kmod wireguard - dnf: - name: - - kmod-wireguard - - wireguard-tools + - name: Install kmod wireguard + dnf: + name: + - kmod-wireguard + - wireguard-tools + +- name: Install wireguard for RHEL 9 + when: distribution_major_version == '9' + block: + - name: Install repos + dnf: + name: + - wireguard-tools + state: present - name: Enable wg-quick systemd unit systemd: