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.
42 lines
1.1 KiB
YAML
42 lines
1.1 KiB
YAML
---
|
|
# ansible_role_proxmox_provision/tasks/main.yml
|
|
# Main tasks for role
|
|
# ===================
|
|
|
|
- name: Ensure we are running on Proxmox
|
|
ansible.builtin.stat:
|
|
path: /usr/bin/pveversion
|
|
register: proxmox_check
|
|
|
|
- name: Stop if not Proxmox
|
|
ansible.builtin.fail:
|
|
msg: "This role must run on Proxmox VE nodes only."
|
|
when: not proxmox_check.stat.exists
|
|
|
|
# Other tasks
|
|
# ===================
|
|
|
|
- name: Configure apt
|
|
ansible.builtin.import_tasks: apt.yml
|
|
|
|
- name: Disable enterprise repo, enable no-subscription
|
|
ansible.builtin.import_tasks: repos.yml
|
|
|
|
- name: Disable swap or tune it
|
|
ansible.builtin.import_tasks: swap.yml
|
|
|
|
- name: Install api utilities
|
|
ansible.builtin.import_tasks: utilities.yml
|
|
|
|
- name: Remove the infamous subscription nag
|
|
ansible.builtin.import_tasks: subscription.yml
|
|
|
|
- name: Stop logs from quietly murdering the disk
|
|
ansible.builtin.import_tasks: logrotate.yml
|
|
|
|
- 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
|