mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-12-08 18:35:11 +00:00
- Introduce global IS_CONTAINER flag based on ansible_virtualization facts - Skip systemd-based handlers and tasks when running inside containers - Extend EXCLUDED_ROLES list in GitHub Actions test-deploy workflow - Ensure docker.sock is mounted for all CI deploy stages - Improve sys-svc-docker by suppressing service restarts inside containers - Add meta: flush_handlers to properly trigger delayed docker restarts - Update sys-service handlers with container guards - Update sys-timer tasks to avoid systemctl inside CI containers - Enhance drv-non-free role with Manjaro detection and mhwd fallback warning - Skip swapfile generation in containers - Minor service template fixes and cleanup in proxy.conf.j2 Details and discussion: https://chatgpt.com/share/6930a4ca-56f4-800f-9b3d-4791f040a03b
33 lines
925 B
YAML
33 lines
925 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
|
|
community.general.pacman:
|
|
name: mhwd
|
|
state: present
|
|
become: true
|
|
when:
|
|
- ansible_facts['distribution'] is defined
|
|
- ansible_facts['distribution'] in ['ManjaroLinux', 'Manjaro']
|
|
register: mhwd_install
|
|
|
|
- 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
|