mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 19:01:54 +00:00
Replaces the raw package modules at 76 call sites with package_install, moves each role's distribution mapping into its own meta/packages.yml, and turns the inventory PACKAGES variable from source-keyed literal names into a list of declared package ids. The lint that forbids the raw modules is enabled here, because the migration burns it down from 76 offenders to zero. Removes sys-aur, sys-aur-install and sys-package. The AUR build user, the passwordless pacman rule and the inventory-driven install are part of the plan the action plugin executes, so the roles no longer carry them. Declaring the mappings surfaced breakage the raw modules had hidden: on Debian the `which` binary comes from debianutils, jrnl is in no Debian or Ubuntu suite, chromium-browser is absent from Debian stable, JDK 11 is unobtainable on RedHat, wireguard had no RedHat branch at all, qbittorrent was built from the AUR although Arch ships it in extra, and desk-docker installed a Docker variant that conflicts with the one sys-svc-container installs. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
29 lines
778 B
YAML
29 lines
778 B
YAML
---
|
|
- name: 📊 Gather OS facts (ensure we know distribution)
|
|
ansible.builtin.setup:
|
|
when: ansible_facts is not defined
|
|
|
|
- name: ✅ Ensure mhwd is installed on Manjaro
|
|
package_install:
|
|
id: mhwd
|
|
become: true
|
|
|
|
- name: 🔍 Detect mhwd command
|
|
ansible.builtin.stat:
|
|
path: /usr/bin/mhwd
|
|
register: mhwd_binary
|
|
|
|
- name: 📦 Install nonfree drivers via mhwd (Manjaro only)
|
|
ansible.builtin.shell: mhwd -a pci nonfree 0300
|
|
become: true
|
|
when:
|
|
- mhwd_binary.stat.exists
|
|
|
|
- name: ⚠️ Warn when mhwd is not available
|
|
ansible.builtin.debug:
|
|
msg: >
|
|
Skipping proprietary GPU driver installation: `mhwd` not found.
|
|
This role currently only supports Manjaro (mhwd); on other distros it does nothing.
|
|
when:
|
|
- not mhwd_binary.stat.exists
|