feat : Add task to configure kernel panic behavior and auto-reboot #29

Merged
Jose merged 3 commits from dev into main 2026-02-15 08:41:04 +01:00
2 changed files with 21 additions and 0 deletions
Showing only changes of commit 059ea94842 - Show all commits

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
Review

[Lines 36-41] [Score: 2] Adding new tasks without proper documentation or justification, which may cause confusion or unexpected behavior. Recommendation: Include a comment explaining the purpose of these new additions for clarity and maintainability.

[Lines 36-41] [Score: 2] Adding new tasks without proper documentation or justification, which may cause confusion or unexpected behavior. Recommendation: Include a comment explaining the purpose of these new additions for clarity and maintainability. ```