From 6f25600a79aabfb50c67e396beb8e0488998dfbe Mon Sep 17 00:00:00 2001 From: Ahmed AbdelHalim Date: Sun, 1 Mar 2026 23:48:05 +0100 Subject: Refactor graphics driver roles Now with the gpu_driver, the installing of the correct driver is delegated to this role, which orchestrate the installing of one or more drivers. This refactoring of the role/testing, means that the roles don't run on testing (intentionally), if a driver needs to be tested it will be added but for now it's not really all that beneficial to keep this 30+ minutes testing roles running just to test the packages existence. It also simplifies the roles, and added as a dependency for steam which is the main reason why these are needed to be installed (also better hyprland animations, but that's not as crucial as steam failing without the drivers). --- roles/gpu_driver/tasks/main.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 roles/gpu_driver/tasks/main.yml (limited to 'roles/gpu_driver/tasks') diff --git a/roles/gpu_driver/tasks/main.yml b/roles/gpu_driver/tasks/main.yml new file mode 100644 index 00000000..7f6f130f --- /dev/null +++ b/roles/gpu_driver/tasks/main.yml @@ -0,0 +1,12 @@ +--- +- name: "Detect GPU" + ansible.builtin.command: + cmd: "lspci" + register: gpu_driver_lspci + changed_when: false + +- name: "Include driver role for matched GPU" + ansible.builtin.include_role: + name: "{{ item.role }}" + loop: "{{ gpu_driver_map }}" + when: item.match in gpu_driver_lspci.stdout -- cgit v1.2.3