ansible/roles/networking/tasks/main.yml
Jean-Marie Mineau faa50f9b36 fix condition
2021-04-23 00:44:49 +02:00

28 lines
615 B
YAML

---
- name: Enable ipv4 forwarding
ansible.posix.sysctl:
name: net.ipv4.ip_forward
value: '1'
sysctl_set: true
when: ipv4_forwarding
- name: Enable ipv6 forwarding
ansible.posix.sysctl:
name: net.ipv6.conf.all.forwarding
value: '1'
sysctl_set: true
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