split wireguard install for el8 and el9

This commit is contained in:
ace 2022-07-13 18:09:24 +03:00
parent fb0ac44188
commit b7d9f987d0
No known key found for this signature in database
GPG Key ID: 2E47CC17BA7F8CF0

View File

@ -1,15 +1,27 @@
- name: Install repos - name: Install wireguard for RHEL 8
dnf: when: distribution_major_version == '8'
name: block:
- elrepo-release - name: Install repos
- epel-release dnf:
state: present name:
- elrepo-release
- epel-release
state: present
- name: Install kmod wireguard - name: Install kmod wireguard
dnf: dnf:
name: name:
- kmod-wireguard - kmod-wireguard
- wireguard-tools - 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 - name: Enable wg-quick systemd unit
systemd: systemd: