Files
2026-08-26 09:14:32 +02:00

38 lines
1.4 KiB
YAML

# community.general.pacman ignores the repo/pkg syntax, so call pacman.
- name: Install the patched Mesa stack
become: true
ansible.builtin.command:
argv: "{{ ['pacman', '-S', '--noconfirm'] + (mesa_stack | map('regex_replace', '^', 'bc250-cachyos/') | list) }}"
register: mesa_install
changed_when: "'there is nothing to do' not in mesa_install.stdout"
- name: Read the installed Mesa version
ansible.builtin.command: pacman -Q mesa
register: mesa_ver
changed_when: false
# bc250-cachyos pkgrel carries a dot (1.67), the official one does not.
- name: Verify the patched Mesa is the installed one
ansible.builtin.assert:
that: "'.' in mesa_ver.stdout.split('-')[-1]"
fail_msg: "Installed {{ mesa_ver.stdout }}: expected a bc250-cachyos pkgrel like 1.67."
# The gfx103 patch is opt-in and off by default. Without this the device
# stays GFX10.1 and mesh/task shaders are not exposed.
- name: Enable the GFX10.3 promotion globally
become: true
ansible.builtin.lineinfile:
path: /etc/environment
regexp: '^RADV_GFX103='
line: 'RADV_GFX103=1'
# Pin last: IgnorePkg outranks the repo/pkg syntax, so writing it before
# the install would make pacman prompt instead of proceeding.
- name: Pin the Mesa stack against upstream upgrades
become: true
ansible.builtin.lineinfile:
path: /etc/pacman.conf
regexp: '^IgnorePkg\s*='
line: "IgnorePkg = {{ mesa_stack | join(' ') }}"
insertafter: '^\[options\]'