29 lines
584 B
YAML
29 lines
584 B
YAML
|
---
|
||
|
- name: Install wg-tools on host
|
||
|
apk:
|
||
|
name:
|
||
|
- wireguard-tools-wg
|
||
|
state: present
|
||
|
|
||
|
- name: Enable IPv6 forwarding
|
||
|
ansible.posix.sysctl:
|
||
|
name: net.ipv6.conf.all.forwarding
|
||
|
value: '1'
|
||
|
sysctl_file: /etc/sysctl.d/maatma.conf
|
||
|
|
||
|
- name: ensure /etc/wireguard exists
|
||
|
file:
|
||
|
path: /etc/wireguard
|
||
|
state: directory
|
||
|
|
||
|
- name: configure wg-adlin
|
||
|
template:
|
||
|
src: "wg.conf.j2"
|
||
|
dest: "/etc/wireguard/wg-adlin.conf"
|
||
|
|
||
|
- name: enable wg-adlin
|
||
|
template:
|
||
|
src: networking.j2
|
||
|
dest: "/etc/network/interfaces.d/wg-adlin"
|
||
|
notify: restart networking
|