Enable Wayland and GPU drivers
This commit is contained in:
parent
ea4ae50be3
commit
8b3c8e506d
5
main.yml
5
main.yml
|
@ -4,5 +4,6 @@
|
|||
roles:
|
||||
- { role: 01_host_info }
|
||||
- { role: 02_basics }
|
||||
- { role: 03_packages }
|
||||
- { role: 04_user }
|
||||
- { role: 03_wayland }
|
||||
- { role: 05_packages }
|
||||
- { role: 07_user }
|
71
roles/03_wayland/tasks/main.yml
Normal file
71
roles/03_wayland/tasks/main.yml
Normal file
|
@ -0,0 +1,71 @@
|
|||
---
|
||||
- name: Install Xorg
|
||||
community.general.pacman:
|
||||
name:
|
||||
- xorg-xwayland
|
||||
state: present
|
||||
become: true
|
||||
|
||||
- name: Detect GPU
|
||||
# ansible.builtin.shell: set -o pipefail && lspci -v | grep -A1 -e VGA -e 3D # noqa command-instead-of-shell
|
||||
ansible.builtin.shell: set -o pipefail && lspci | grep -i 'VGA\|3D\|display' # noqa command-instead-of-shell
|
||||
register: gpu_result
|
||||
changed_when: no
|
||||
|
||||
- name: Install GPU drivers (AMD)
|
||||
community.general.pacman:
|
||||
name:
|
||||
- mesa
|
||||
- mesa-utils
|
||||
# https://wiki.archlinux.org/title/Xorg
|
||||
- xf86-video-amdgpu
|
||||
# https://wiki.archlinux.org/title/Hardware_video_acceleration
|
||||
- mesa-vdpau
|
||||
- libva-mesa-driver
|
||||
# https://wiki.archlinux.org/title/Vulkan
|
||||
- vulkan-radeon
|
||||
# https://wiki.archlinux.org/title/GPGPU
|
||||
- rocm-hip-runtime
|
||||
- rocm-hip-sdk
|
||||
- hip-runtime-amd
|
||||
- rocm-core
|
||||
- rocm-opencl-runtime
|
||||
- rocm-opencl-sdk
|
||||
state: present
|
||||
become: true
|
||||
when: ("'radeon' in gpu_result.stdout.lower()") or ("'amd/ati' in gpu_result.stdout.lower()")
|
||||
|
||||
- name: Install GPU drivers (Intel)
|
||||
community.general.pacman:
|
||||
name:
|
||||
- mesa
|
||||
- mesa-utils
|
||||
# https://wiki.archlinux.org/title/Xorg
|
||||
- xf86-video-intel
|
||||
# https://wiki.archlinux.org/title/Hardware_video_acceleration
|
||||
- intel-media-driver
|
||||
- libva-intel-driver
|
||||
# https://wiki.archlinux.org/title/Vulkan
|
||||
- vulkan-intel
|
||||
# https://wiki.archlinux.org/title/GPGPU
|
||||
- intel-compute-runtime
|
||||
- opencl-clover-mesa
|
||||
state: present
|
||||
become: true
|
||||
when: "'intel' in gpu_result.stdout.lower()"
|
||||
|
||||
- name: Install GPU drivers (Nvidia)
|
||||
community.general.pacman:
|
||||
name:
|
||||
- mesa
|
||||
- mesa-utils
|
||||
# https://wiki.archlinux.org/title/Xorg
|
||||
- nvidia
|
||||
# https://wiki.archlinux.org/title/Hardware_video_acceleration
|
||||
- nvidia-utils
|
||||
# https://wiki.archlinux.org/title/GPGPU
|
||||
- cuda
|
||||
- opencl-nvidia
|
||||
state: present
|
||||
become: true
|
||||
when: "'nvidia' in gpu_result.stdout.lower()"
|
Loading…
Reference in New Issue
Block a user