Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pre_tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

- name: Set has_amd_gpu fact based on lspci output
ansible.builtin.set_fact:
has_amd_gpu: "{{ 'true' if lspci_output_amd.stdout != '' else 'false' }}"
has_amd_gpu: "{{ lspci_output_amd.stdout | length > 0 }}"

- name: Check for Intel GPU presence
ansible.builtin.shell:
Expand All @@ -46,7 +46,7 @@

- name: Set has_intel_gpu fact based on lspci output
ansible.builtin.set_fact:
has_intel_gpu: "{{ 'true' if lspci_output_intel.stdout != '' else 'false' }}"
has_intel_gpu: "{{ lspci_output_intel.stdout | length > 0 }}"

- name: Check for NVIDIA GPU presence
ansible.builtin.shell:
Expand All @@ -59,6 +59,6 @@

- name: Set has_nvidia_gpu fact based on lspci output
ansible.builtin.set_fact:
has_nvidia_gpu: "{{ 'true' if lspci_output.stdout != '' else 'false' }}"
has_nvidia_gpu: "{{ lspci_output.rc | default(1) == 0 }}"

tags: always
11 changes: 5 additions & 6 deletions roles/davinci_resolve/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,21 @@
- mesa-opencl-icd
- opencl-headers
state: present
when: has_amd_gpu
when: has_amd_gpu | bool

- name: Install OpenCL ICD for Intel GPU
become: true
ansible.builtin.apt:
name: intel-opencl-icd
state: present
when: has_intel_gpu
when: has_intel_gpu | bool

- name: Install OpenCL development package for NVIDIA GPU
become: true
ansible.builtin.apt:
name: nvidia-opencl-dev
state: present
when: has_nvidia_gpu
when: has_nvidia_gpu | bool

- name: Fetch the download_id and version info from the source URL
ansible.builtin.uri:
Expand All @@ -62,9 +62,8 @@
ansible.builtin.set_fact:
pkgver: >-
{{
major_version
+ '.' + minor_version
+ ('.' + release_version if release_version | int != 0 else '')
major_version ~ '.' ~ minor_version
~ ('.' ~ release_version if (release_version | int) != 0 else '')
}}

# First step: Register to get the actual download URL
Expand Down
2 changes: 1 addition & 1 deletion roles/graphics_drivers/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
suites: "{{ ansible_distribution_release }}"
components: main
signed_by: https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2388FF3BE10A76F638F80723FCAE110B1118213C
when: has_nvidia_gpu == 'true'
when: has_nvidia_gpu | bool

- name: Upgrade installed packages
become: true
Expand Down