mirror of
https://gitea.0xace.cc/ansible-galaxy/wireguard-ui.git
synced 2024-11-28 17:36:38 +00:00
55 lines
1.2 KiB
YAML
55 lines
1.2 KiB
YAML
- 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:
|
|
- name: Install repos
|
|
dnf:
|
|
name:
|
|
- elrepo-release
|
|
- epel-release
|
|
state: present
|
|
|
|
- name: Install wireguard packages
|
|
dnf:
|
|
name:
|
|
- kmod-wireguard
|
|
- wireguard-tools
|
|
state: present
|
|
|
|
- name: Install wireguard for RHEL 9
|
|
when: ansible_facts['distribution_major_version'] == '9'
|
|
block:
|
|
- name: Install wireguard packages
|
|
dnf:
|
|
name:
|
|
- wireguard-tools
|
|
state: present
|
|
|
|
- name: Enable wg-quick systemd unit
|
|
systemd:
|
|
name: wg-quick@{{ wireguard_ui_combined_env['WGUI_CONFIG_FILE_PATH'] | basename | split('.') | first }}
|
|
enabled: yes
|
|
daemon_reload: yes
|