Skip to content

Commit f82ea35

Browse files
committed
tiny tidy
1 parent f6277c4 commit f82ea35

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

ansible/roles/cuda/tasks/install.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,21 @@
3333
ansible.builtin.shell:
3434
cmd: >-
3535
dnf module info nvidia-driver:{{ cuda_nvidia_driver_stream }} |
36-
grep {{ cuda_nvidia_driver_version }}.el{{ ansible_distribution_major_version }}.{{ ansible_architecture }}
36+
grep -F {{ cuda_nvidia_driver_version }}.el{{ ansible_distribution_major_version }}.{{ ansible_architecture }}
3737
changed_when: false
3838
register: _cuda_driver_module_packages
3939
# returns a list of lines like ' : libnvidia-cfg-3:570.133.20-1.el9.x86_64'
4040

4141
- name: Install nvidia driver packages
42+
# its not possible to install a version of a module
43+
# apparently this is the best way of approximating that
44+
# but it is more idempotent than the module install anyway
4245
ansible.builtin.dnf:
4346
name: "{{ _cuda_driver_module_packages.stdout_lines | map('trim', ': ') }}"
4447
register: _cuda_driver_install
4548

49+
- meta: end_here
50+
4651
- name: Check kernel has not been modified
4752
assert:
4853
that: "'kernel ' not in _cuda_driver_install.stdout | default('')" # space ensures we don't flag e.g. kernel-devel-matched

0 commit comments

Comments
 (0)