21 lines
586 B
YAML
21 lines
586 B
YAML
---
|
|
# tasks file for ipforwarding
|
|
|
|
- name: Changer pour IPv4
|
|
ansible.posix.sysctl:
|
|
name: net.ipv4.conf.all.forwarding
|
|
value: "{{ ipforwarding_ipv4 | string }}"
|
|
sysctl_file: /etc/sysctl.d/100-ipv4_forwarding.conf
|
|
sysctl_set: true
|
|
become: true
|
|
when: ipforwarding_ipv4 | string | length > 0
|
|
|
|
- name: Changer pour IPv6
|
|
ansible.posix.sysctl:
|
|
name: net.ipv6.conf.all.forwarding
|
|
value: "{{ ipforwarding_ipv6 | string }}"
|
|
sysctl_file: /etc/sysctl.d/100-ipv6_forwarding.conf
|
|
sysctl_set: true
|
|
become: true
|
|
when: ipforwarding_ipv6 | string | length > 0
|