[INFO] Création du rôle

This commit is contained in:
2023-04-18 17:35:39 +02:00
parent 4c219298f2
commit e975d1e2ae
4 changed files with 68 additions and 4 deletions

20
tasks/main.yml Normal file
View File

@@ -0,0 +1,20 @@
---
# 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