feat : Add task to configure kernel panic behavior and auto-reboot
Some checks failed
ansible-lint / Ansible Lint (push) Failing after 11s
Gitleaks Scan / gitleaks (push) Successful in 4s
Markdown Lint / markdown-lint (push) Successful in 5s

This commit introduces two new tasks in the `kernel.yml` file: one to configure the kernel panic behavior and another for enabling automatic reboot on kernel panic. These enhancements improve system reliability by ensuring that the system can recover from critical errors more effectively.
This commit is contained in:
2026-02-15 08:30:32 +01:00
parent fe3acd58e8
commit 059ea94842
2 changed files with 21 additions and 0 deletions

18
tasks/kernel.yml Normal file
View File

@@ -0,0 +1,18 @@
---
# -------------------------------------------------
# Configure kernel panic behavior
# -------------------------------------------------
- name: kernel | Configure kernel panic auto-reboot
ansible.builtin.copy:
dest: /etc/sysctl.d/99-kernelpanic.conf
content: |
kernel.panic = 10
kernel.panic_on_oops = 1
owner: root
group: root
mode: '0644'
- name: kernel | Apply kernel panic settings
ansible.builtin.command:
cmd: sysctl -p /etc/sysctl.d/99-kernelpanic.conf
become: true

View File

@@ -36,3 +36,6 @@
- name: Install powertop, auto-tune, and make it persistent
ansible.builtin.import_tasks: powertop.yml
- name: kernel panic auto-reboot
ansible.builtin.import_tasks: kernel.yml