add el7 support

This commit is contained in:
ace 2022-07-13 18:25:58 +03:00
parent f1b7eb3a17
commit a571c34be8
No known key found for this signature in database
GPG Key ID: 2E47CC17BA7F8CF0

View File

@ -1,3 +1,26 @@
- name: Install wireguard for RHEL 7
when: ansible_facts['distribution_major_version'] == '7'
block:
- name: Install repos
yum:
name:
- elrepo-release
- epel-release
state: present
- name: Install wireguard packages
yum:
name:
- yum-plugin-elrepo
state: present
- name: Install wireguard packages
yum:
name:
- kmod-wireguard
- wireguard-tools
state: present
- name: Install wireguard for RHEL 8
when: ansible_facts['distribution_major_version'] == '8'
block:
@ -13,6 +36,7 @@
name:
- kmod-wireguard
- wireguard-tools
state: present
- name: Install wireguard for RHEL 9
when: ansible_facts['distribution_major_version'] == '9'