From 52b8223f57246bd46fcf1394ed8d69340ff80dfb Mon Sep 17 00:00:00 2001 From: Mark Wong Date: Tue, 31 Oct 2023 20:19:21 +0000 Subject: [PATCH] Remove kernel.core_pattern from sysctl.conf Only if it's in there, which tpaexec will set. tpaexec currently forces some value to be set, and sometimes we want to use the distro's default or another tool's preferred value that it may manage, like systemd-coredump. If we leave kernel.core_pattern in /etc/sysctl.conf, tpaexec configures the system to run it last so it'll override anything set before it. This can be removed at a later time, when tpaexec can be used to not set kernel.core_pattern. --- .../tasks/enable_core_dump.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/roles/manage_operating_system/tasks/enable_core_dump.yml b/roles/manage_operating_system/tasks/enable_core_dump.yml index bd3cd880..6bdb13aa 100644 --- a/roles/manage_operating_system/tasks/enable_core_dump.yml +++ b/roles/manage_operating_system/tasks/enable_core_dump.yml @@ -1,4 +1,18 @@ --- +# This and reloading sysctl can be removed when tpaexec doesn't force any +# kernel.core_pattern to be set. +- name: Remove kernel.core_pattern from tpaexec installed sysctl file + ansible.builtin.lineinfile: + path: /etc/sysctl.conf + search_string: kernel.core_pattern=core.%e.%p.%t + state: absent + become: true + +- name: Reload sysctl settings + ansible.builtin.command: + cmd: sysctl -p --system + become: true + - name: Enable unlimited core size for all users community.general.pam_limits: domain: "*"