feat ✨: Add task to configure kernel panic behavior and auto-reboot #29
18
tasks/kernel.yml
Normal file
18
tasks/kernel.yml
Normal 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
|
||||
@@ -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
|
||||
|
|
||||
|
||||
Reference in New Issue
Block a user
[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.