feat: hardware/firmware/gpu/peripherals detection and packages

This commit is contained in:
2026-05-30 18:05:05 +02:00
parent 9757ed3785
commit c843f5289b
10 changed files with 30 additions and 184 deletions

View File

@@ -15,8 +15,8 @@
'{{ os_family }}'. Extend roles/bootstrap/vars/hardware.yml.
quiet: true
# nvidia_driver: auto open (Turing+) proprietary (older, if family ships it)
# nouveau (fallback). Explicit value falls back to nouveau when
# nvidia_driver: auto -> open (Turing+) -> proprietary (older, if family ships it)
# -> nouveau (fallback). Explicit value falls back to nouveau when
# the family lacks packages for it.
- name: Resolve Nvidia driver flavor
vars:
@@ -163,25 +163,19 @@
nvidia_driver={{ _nvidia_driver_resolved }},
wireless={{ hardware_profile_active.wireless | default([]) | join(',') | default('-', true) }},
fingerprint={{ hardware_profile_active.fingerprint | default(false) }}
{{ _hardware_packages | length }} package(s)
-> {{ _hardware_packages | length }} package(s)
- name: Install hardware packages
when: _hardware_packages | length > 0
vars:
_install_commands:
RedHat: >-
{{ chroot_command }} dnf --releasever={{ os_version }}
{{ chroot_command }} dnf --releasever={{ os_version_major }}
--setopt=install_weak_deps=False install -y {{ _hardware_packages | join(' ') }}
Debian: >-
{{ chroot_command }} apt install -y {{ _hardware_packages | join(' ') }}
Archlinux: >-
pacstrap /mnt {{ _hardware_packages | join(' ') }}
Suse: >-
{{ chroot_command }} zypper install -y {{ _hardware_packages | join(' ') }}
Alpine: >-
{{ chroot_command }} apk add {{ _hardware_packages | join(' ') }}
Void: >-
{{ chroot_command }} xbps-install -Sy {{ _hardware_packages | join(' ') }}
ansible.builtin.command: "{{ _install_commands[os_family] }}"
register: _hardware_install_result
changed_when: _hardware_install_result.rc == 0