From 321b616270d75cd1f79de84942afa0a62379304d Mon Sep 17 00:00:00 2001 From: Ahmed Abdelhalim Date: Sun, 14 Jun 2026 01:02:17 +0200 Subject: Fix gateway role after rpi os update --- roles/gateway/tasks/main.yml | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'roles/gateway/tasks') diff --git a/roles/gateway/tasks/main.yml b/roles/gateway/tasks/main.yml index a571dd52..f4826a72 100644 --- a/roles/gateway/tasks/main.yml +++ b/roles/gateway/tasks/main.yml @@ -10,17 +10,12 @@ - name: "Configure IP forwarding" become: true - ansible.builtin.blockinfile: - path: "/etc/sysctl.conf" - state: "{{ 'present' if gateway_enabled else 'absent' }}" - prepend_newline: true - append_newline: true - marker: "# ==== {mark} ANSIBLE GATEWAY CONFIG" - create: true + ansible.builtin.template: + src: "99-gateway.conf.j2" + dest: "/etc/sysctl.d/99-gateway.conf" + owner: "root" + group: "root" mode: "0644" - block: | - net.ipv4.ip_forward=1 - net.ipv6.conf.all.forwarding=1 notify: "Reload sysctl" - name: "Deploy gateway apply rules script" -- cgit v1.2.3