---
- name: π Gather OS facts (ensure we know distribution)
ansible.builtin.setup:
when: ansible_facts is not defined
- 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