fix(system_baseline): persist sysctls in an own sysctl.d drop-in
systemd-sysctl on Debian 13 does not read /etc/sysctl.conf, so the hardened values were lost on reboot. The role now applies the live values on their own, writes them to a drop-in under /etc/sysctl.d and removes its keys from /etc/sysctl.conf. Refs #510 Assisted-by: Claude Code:claude-opus-5-5
This commit is contained in:
1 parent
cf99893855
commit
d88e5d237a
14 files changed
+282
-17
No files matched your search
@@ -38,7 +38,12 @@
|
||||
when: system_baseline_apt_daily_timeout | length > 0
|
||||
tags: apt-daily-timeout
|
||||
|
||||
- name: Harden sysctl
|
||||
# Applied first, so a value the kernel refuses stops the run before it is persisted. molecule's containers have a read-only /proc/sys.
|
||||
- name: Apply the sysctl hardening
|
||||
ansible.builtin.import_tasks: sysctl_apply.yml
|
||||
tags: [sysctl, molecule-notest]
|
||||
|
||||
- name: Persist the sysctl hardening
|
||||
ansible.builtin.import_tasks: sysctl.yml
|
||||
tags: sysctl
|
||||
|
||||
|
||||
Reference in new issue
Block a user