infrastructure/ansible/roles/wireguard_53/tasks/main.yml

34 lines
621 B
YAML
Raw Normal View History

2022-03-18 19:44:06 +00:00
- 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/wg53.conf
mode: "0600"
backup: true
become: true
notify: restart wireguard
- name: Wireguard client config
template:
src: files/client.conf
2023-06-17 16:00:30 +01:00
dest: "{{ me.home }}/wg53.conf"
2022-03-18 19:44:06 +00:00
mode: "0600"
become: true
notify: restart wireguard
- name: Enable wireguard
service:
name: wg-quick@wg53
enabled: true
become: true