2023-10-01 17:02:49 +02:00
|
|
|
---
|
2024-11-18 15:15:49 +01:00
|
|
|
- name: Set default packages for wireguard
|
|
|
|
ansible.builtin.set_fact:
|
|
|
|
wg_packages:
|
|
|
|
- wireguard-tools
|
|
|
|
|
|
|
|
- name: Set packages for wireguard on Debian-based OSs
|
|
|
|
ansible.builtin.set_fact:
|
|
|
|
wg_packages:
|
|
|
|
- wireguard
|
|
|
|
when: ansible_distribution in [ "Debian", "Ubuntu" ]
|
|
|
|
|
|
|
|
- name: Set packages for wireguard on archLinux
|
|
|
|
ansible.builtin.set_fact:
|
|
|
|
wg_packages:
|
|
|
|
- wireguard
|
|
|
|
- systemd-resolveconf
|
|
|
|
when: ansible_distribution == "Archlinux"
|
2023-10-01 17:02:49 +02:00
|
|
|
|
2024-11-18 15:15:49 +01:00
|
|
|
- name: Install wireguard and dependencies
|
2023-10-01 17:02:49 +02:00
|
|
|
ansible.builtin.package:
|
2024-11-18 15:15:49 +01:00
|
|
|
name: "{{ wg_packages }}"
|
2023-10-01 17:02:49 +02:00
|
|
|
state: present
|