infrastructure/ansible/roles/glinet_vpn/tasks/main.yml
Jake Howard 670ad78d44
All checks were successful
/ terraform (push) Successful in 44s
/ ansible (push) Successful in 1m34s
Add wireguard config for glinet router
2024-04-23 22:19:57 +01:00

34 lines
658 B
YAML

- name: Include vault
include_vars: vault.yml
- name: Install wireguard tools
package:
name: "{{ item }}"
become: true
loop:
- wireguard-tools
- qrencode
- name: Wireguard server config
template:
src: files/server.conf
dest: /etc/wireguard/glinet.conf
mode: "0600"
backup: true
become: true
notify: restart wireguard
- name: Wireguard client config
template:
src: files/client.conf
dest: "{{ me.home }}/glinet-vpn.conf"
mode: "0600"
owner: "{{ me.user }}"
become: true
notify: restart wireguard
- name: Enable wireguard
service:
name: wg-quick@glinet
enabled: true
become: true