Update and configure mkinitcpio hooks

This commit is contained in:
2025-10-21 10:24:22 +02:00
parent 75d5875cac
commit c79811541b
9 changed files with 27 additions and 4 deletions

View File

@@ -530,6 +530,25 @@
state: present
become: true
- name: set mkinitcpio hooks
set_fact:
mkinitcpio_hooks: "base udev autodetect microcode modconf kms keyboard keymap consolefont block encrypt lvm2 filesystems resume fsck"
when: machine.encrypted_root|bool
- name: set mkinitcpio hooks
set_fact:
mkinitcpio_hooks: "base udev autodetect microcode modconf kms keyboard keymap consolefont block filesystems resume fsck"
when: not machine.encrypted_root|bool
- name: configure mkinitcpio hooks
lineinfile:
path: /etc/mkinitcpio.conf
regexp: "^#?HOOKS=.*$"
line: 'HOOKS=({{ mkinitcpio_hooks }})'
become: true
notify:
- rebuild initrd
- name: use vz4 for mkinitcpio compression
lineinfile:
path: /etc/mkinitcpio.conf