16 lines
600 B
YAML
16 lines
600 B
YAML
---
|
|
# Driver installation is out of scope for this role — Ansible only configures
|
|
# the container runtime on top of a driver that is already present on the host.
|
|
- name: Driver check | Look up nvidia-smi
|
|
ansible.builtin.command: which nvidia-smi
|
|
register: _nvidia_smi
|
|
changed_when: false
|
|
failed_when: false
|
|
|
|
- name: Driver check | Fail if NVIDIA driver is not installed
|
|
ansible.builtin.fail:
|
|
msg: >-
|
|
nvidia-smi not found on {{ inventory_hostname }}. Install the NVIDIA driver
|
|
manually before running this role — it is not managed by Ansible.
|
|
when: _nvidia_smi.rc != 0
|