2022-07-13 15:09:24 +00:00
|
|
|
- name: Install wireguard for RHEL 8
|
2022-07-13 15:11:27 +00:00
|
|
|
when: ansible_facts['distribution_major_version'] == '8'
|
2022-07-13 15:09:24 +00:00
|
|
|
block:
|
|
|
|
- name: Install repos
|
|
|
|
dnf:
|
|
|
|
name:
|
|
|
|
- elrepo-release
|
|
|
|
- epel-release
|
|
|
|
state: present
|
2022-07-13 12:27:32 +00:00
|
|
|
|
2022-07-13 15:09:24 +00:00
|
|
|
- name: Install kmod wireguard
|
|
|
|
dnf:
|
|
|
|
name:
|
|
|
|
- kmod-wireguard
|
|
|
|
- wireguard-tools
|
|
|
|
|
|
|
|
- name: Install wireguard for RHEL 9
|
2022-07-13 15:11:27 +00:00
|
|
|
when: ansible_facts['distribution_major_version'] == '9'
|
2022-07-13 15:09:24 +00:00
|
|
|
block:
|
|
|
|
- name: Install repos
|
|
|
|
dnf:
|
|
|
|
name:
|
|
|
|
- wireguard-tools
|
|
|
|
state: present
|
2022-07-13 13:00:25 +00:00
|
|
|
|
|
|
|
- name: Enable wg-quick systemd unit
|
|
|
|
systemd:
|
|
|
|
name: wg-quick@{{ wireguard_ui_env['WGUI_CONFIG_FILE_PATH'] | basename | split('.') | first }}
|
|
|
|
enabled: yes
|
|
|
|
daemon_reload: yes
|