Initial commit
This commit is contained in:
commit
c30d65b16e
14 changed files with 301 additions and 0 deletions
28
tasks/networking.yml
Normal file
28
tasks/networking.yml
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
---
|
||||
- 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue