From f7d2a20ef754fb12ef5305276210d1b396989aa1 Mon Sep 17 00:00:00 2001 From: Chris Hammer Date: Thu, 17 Apr 2025 17:43:13 -0400 Subject: [PATCH] Writing our own sysctl.d file instead of updating /etc/sysctl.conf directly --- roles/rear_backup/tasks/main.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/roles/rear_backup/tasks/main.yml b/roles/rear_backup/tasks/main.yml index e866bfb..e0698cc 100644 --- a/roles/rear_backup/tasks/main.yml +++ b/roles/rear_backup/tasks/main.yml @@ -61,11 +61,15 @@ when: - rear_config_stat['stat']['exists'] | bool -- name: Disable IPv6 for future reboots if requested +- name: Disable IPv6 per survey choice ansible.builtin.lineinfile: - path: /etc/sysctl.conf + create: true + path: /etc/sysctl.d/42-ipv6-disable.conf line: "net.ipv6.conf.all.disable_ipv6 = 1" state: present + owner: root + group: root + mode: '0644' when: - rear_ipv6_disable_on_boot | default(false) | bool