Skip to content

Commit 211d230

Browse files
committed
simplified templating
1 parent cc6ff8d commit 211d230

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ansible/roles/cuda/defaults/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cuda_distro: "rhel{{ ansible_distribution_major_version }}"
22
cuda_repo: "https://developer.download.nvidia.com/compute/cuda/repos/{{ cuda_distro }}/x86_64/cuda-{{ cuda_distro }}.repo"
3-
cuda_driver_stream: default
3+
cuda_driver_stream: open-dkms
44
cuda_package_version: 'latest'
55
cuda_packages:
66
- "cuda{{ ('-' + cuda_package_version) if cuda_package_version != 'latest' else '' }}"

ansible/roles/cuda/tasks/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
register: _cuda_driver_module_enabled
2626

2727
- name: Enable nvidia driver module
28-
ansible.builtin.command: "dnf module enable -y nvidia-driver:{{ 'open-dkms' if cuda_driver_stream == 'default' else cuda_driver_stream }}"
28+
ansible.builtin.command: "dnf module enable -y nvidia-driver:{{ cuda_driver_stream }}"
2929
register: _cuda_driver_module_enable
3030
when: "'No matching Modules to list' in _cuda_driver_module_enabled.stderr"
3131
changed_when: "'Nothing to do' not in _cuda_driver_module_enable.stdout"

0 commit comments

Comments
 (0)