--- - name: "[Sysctl] Enable IPv4 forwarding" ansible.posix.sysctl: name: net.ipv4.ip_forward value: '1' sysctl_file: /etc/sysctl.d/10-ip_forward.conf sysctl_set: yes state: present reload: yes when: network.ipForwarding is true - name: "[Sysctl] Enable IPv6 forwarding" ansible.posix.sysctl: name: net.ipv6.conf.all.forwarding value: '1' sysctl_file: /etc/sysctl.d/10-ip_forward.conf sysctl_set: yes state: present reload: yes when: network.ipForwarding is true - name: "[Sysctl] Disable IPv4 forwarding" ansible.posix.sysctl: name: net.ipv4.ip_forward value: '0' sysctl_file: /etc/sysctl.d/10-ip_forward.conf sysctl_set: yes state: present reload: yes when: network.ipForwarding is false - name: "[Sysctl] Disable IPv6 forwarding" ansible.posix.sysctl: name: net.ipv6.conf.all.forwarding value: '0' sysctl_file: /etc/sysctl.d/10-ip_forward.conf sysctl_set: yes state: present reload: yes when: network.ipForwarding is false