File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 33
33
ansible.builtin.shell :
34
34
cmd : >-
35
35
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 }}
37
37
changed_when : false
38
38
register : _cuda_driver_module_packages
39
39
# returns a list of lines like ' : libnvidia-cfg-3:570.133.20-1.el9.x86_64'
40
40
41
41
- 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
42
45
ansible.builtin.dnf :
43
46
name : " {{ _cuda_driver_module_packages.stdout_lines | map('trim', ': ') }}"
44
47
register : _cuda_driver_install
45
48
49
+ - meta : end_here
50
+
46
51
- name : Check kernel has not been modified
47
52
assert :
48
53
that : " 'kernel ' not in _cuda_driver_install.stdout | default('')" # space ensures we don't flag e.g. kernel-devel-matched
You can’t perform that action at this time.
0 commit comments