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.
19 lines
522 B
YAML
19 lines
522 B
YAML
---
|
|
# -------------------------------------------------
|
|
# 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
|