Writing our own sysctl.d file instead of updating /etc/sysctl.conf directly

This commit is contained in:
Chris Hammer 2025-04-17 17:43:13 -04:00
parent d494c00195
commit f7d2a20ef7

View File

@ -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