Skip to content

Commit

Permalink
Remove kernel.core_pattern from sysctl.conf
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mw2q committed Nov 1, 2023
1 parent 47a1c38 commit 52b8223
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions roles/manage_operating_system/tasks/enable_core_dump.yml
Original file line number Diff line number Diff line change
@@ -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: "*"
Expand Down

0 comments on commit 52b8223

Please sign in to comment.