From 8dc2a10a8da7e83e28e834f81b60af9d137467ef Mon Sep 17 00:00:00 2001 From: Lucas Dousse Date: Fri, 12 Jan 2024 14:15:33 +0100 Subject: [PATCH] Update configure.yml set ipv4_forward when tunnel is defined --- tasks/configure.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tasks/configure.yml b/tasks/configure.yml index 2493ffb..c51caf2 100644 --- a/tasks/configure.yml +++ b/tasks/configure.yml @@ -8,3 +8,12 @@ become: true when: netplan_configuration != [] notify: netplan generate config + +- name: set ipv4_forward + ansible.posix.sysctl: + name: net.ipv4.ip_forward + value: '1' + sysctl_set: true + state: present + reload: true + when: netplan_configuration['network']['tunnels'] is defined