main.yml 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. - name: Gather OS specific variables
  2. include_vars: "{{ ansible_os_family }}.yml"
  3. - name: Check NVIDIA GPU and driver/CUDA status on target host
  4. include_tasks: check-gpu-and-driver.yml
  5. when: nvidia_driver_installer_path is defined and cuda_installer_path is defined
  6. - name: Check local installation files
  7. include_tasks: check-local-files.yml
  8. when: nvidia_driver_installer_path is defined and cuda_installer_path is defined
  9. - name: Install NVIDIA driver (if installer path provided)
  10. include_tasks: install-nvidia-driver.yml
  11. when: nvidia_driver_installer_path is defined
  12. - name: Install CUDA (if installer path provided)
  13. include_tasks: install-cuda.yml
  14. when: nvidia_driver_installer_path is defined and cuda_installer_path is defined
  15. - name: Configure GRUB
  16. include_tasks: configure-grub.yml
  17. when: nvidia_driver_installer_path is defined and cuda_installer_path is defined
  18. - name: Install Container Toolkit
  19. include_tasks: install-container-toolkit.yml
  20. when: nvidia_driver_installer_path is defined and cuda_installer_path is defined
  21. - name: Configure containerd
  22. include_tasks: configure-containerd.yml
  23. when: nvidia_driver_installer_path is defined and cuda_installer_path is defined
  24. - name: Configure host
  25. include_tasks: configure-host.yml
  26. - name: Run post-tasks
  27. include_tasks: post-tasks.yml
  28. when: nvidia_driver_installer_path is defined and cuda_installer_path is defined