fix condition
This commit is contained in:
parent
1881ba57c2
commit
faa50f9b36
2 changed files with 17 additions and 2 deletions
|
@ -4,11 +4,25 @@
|
||||||
name: net.ipv4.ip_forward
|
name: net.ipv4.ip_forward
|
||||||
value: '1'
|
value: '1'
|
||||||
sysctl_set: true
|
sysctl_set: true
|
||||||
when: "{{ ipv4_forwarding }}"
|
when: ipv4_forwarding
|
||||||
|
|
||||||
- name: Enable ipv6 forwarding
|
- name: Enable ipv6 forwarding
|
||||||
ansible.posix.sysctl:
|
ansible.posix.sysctl:
|
||||||
name: net.ipv6.conf.all.forwarding
|
name: net.ipv6.conf.all.forwarding
|
||||||
value: '1'
|
value: '1'
|
||||||
sysctl_set: true
|
sysctl_set: true
|
||||||
when: "{{ ipv6_forwarding }}"
|
when: ipv6_forwarding
|
||||||
|
|
||||||
|
- name: Disable ipv4 forwarding
|
||||||
|
ansible.posix.sysctl:
|
||||||
|
name: net.ipv4.ip_forward
|
||||||
|
value: '0'
|
||||||
|
sysctl_set: true
|
||||||
|
when: not ipv4_forwarding
|
||||||
|
|
||||||
|
- name: Disable ipv6 forwarding
|
||||||
|
ansible.posix.sysctl:
|
||||||
|
name: net.ipv6.conf.all.forwarding
|
||||||
|
value: '0'
|
||||||
|
sysctl_set: true
|
||||||
|
when: not ipv6_forwarding
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
---
|
---
|
||||||
|
# This is so uggly
|
||||||
- name: Reload wireguard for interface
|
- name: Reload wireguard for interface
|
||||||
systemd:
|
systemd:
|
||||||
name: "wg-quick@{{ item }}"
|
name: "wg-quick@{{ item }}"
|
||||||
|
|
Loading…
Reference in a new issue