Reload sysctl (wireguard_endpoint)
This commit is contained in:
parent
94c49143ac
commit
2a57b43184
2 changed files with 13 additions and 1 deletions
|
@ -1,8 +1,14 @@
|
||||||
---
|
---
|
||||||
- name: Reload network interfaces
|
- name: Reload network interfaces
|
||||||
command: ifreload -a
|
become: true
|
||||||
|
command: /sbin/ifreload -a
|
||||||
|
|
||||||
|
- name: Reload sysctl
|
||||||
|
become: true
|
||||||
|
command: /sbin/sysctl --system
|
||||||
|
|
||||||
- name: Reload nftables
|
- name: Reload nftables
|
||||||
|
become: true
|
||||||
systemd:
|
systemd:
|
||||||
name: nftables.service
|
name: nftables.service
|
||||||
state: reloaded
|
state: reloaded
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
---
|
---
|
||||||
- name: Install required packages
|
- name: Install required packages
|
||||||
|
become: true
|
||||||
apt:
|
apt:
|
||||||
pkg:
|
pkg:
|
||||||
- ifupdown2
|
- ifupdown2
|
||||||
|
@ -8,14 +9,18 @@
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
|
|
||||||
- name: Tweak sysctl to enable IP forwarding
|
- name: Tweak sysctl to enable IP forwarding
|
||||||
|
become: true
|
||||||
template:
|
template:
|
||||||
src: sysctl.conf.j2
|
src: sysctl.conf.j2
|
||||||
dest: /etc/sysctl.d/forwarding.conf
|
dest: /etc/sysctl.d/forwarding.conf
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: u=rw,g=r,o=
|
mode: u=rw,g=r,o=
|
||||||
|
notify:
|
||||||
|
- Reload sysctl
|
||||||
|
|
||||||
- name: Create tunnels configurations
|
- name: Create tunnels configurations
|
||||||
|
become: true
|
||||||
template:
|
template:
|
||||||
src: wireguard.conf.j2
|
src: wireguard.conf.j2
|
||||||
dest: "/etc/wireguard/{{ item.name }}.conf"
|
dest: "/etc/wireguard/{{ item.name }}.conf"
|
||||||
|
@ -30,6 +35,7 @@
|
||||||
- Reload network interfaces
|
- Reload network interfaces
|
||||||
|
|
||||||
- name: Create network interfaces
|
- name: Create network interfaces
|
||||||
|
become: true
|
||||||
template:
|
template:
|
||||||
src: interface.j2
|
src: interface.j2
|
||||||
dest: "/etc/network/interfaces.d/{{ item.name }}"
|
dest: "/etc/network/interfaces.d/{{ item.name }}"
|
||||||
|
|
Loading…
Reference in a new issue