feat(edge_vps): add WireGuard setup task and template

This commit is contained in:
Tuan-Dat Tran
2026-02-24 23:50:08 +01:00
parent caecfc7c1d
commit d8822ad904
2 changed files with 44 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
---
- name: Install WireGuard
ansible.builtin.apt:
name: wireguard
state: present
update_cache: true
- name: Deploy WireGuard config
ansible.builtin.template:
src: wireguard/wg0.conf.j2
dest: "{{ edge_vps_wireguard_config_dir }}/{{ edge_vps_wireguard_interface }}.conf"
mode: "0600"
notify: restart wireguard
- name: Enable WireGuard
ansible.builtin.systemd:
name: "wg-quick@{{ edge_vps_wireguard_interface }}"
enabled: true
state: started