check-local-files.yml 888 B

12345678910111213141516171819202122232425
  1. - name: Check if NVIDIA driver installer exists locally
  2. stat:
  3. path: "{{ nvidia_driver_installer_path }}"
  4. register: nvidia_file_check
  5. delegate_to: localhost
  6. become: false
  7. when: nvidia_driver_installer_path is defined
  8. - name: Fail if NVIDIA driver installer not found
  9. fail:
  10. msg: "NVIDIA driver installer not found at {{ nvidia_driver_installer_path }}"
  11. when: nvidia_driver_installer_path is defined and (not nvidia_file_check.stat.exists | default(false))
  12. - name: Check if CUDA installer exists locally
  13. stat:
  14. path: "{{ cuda_installer_path }}"
  15. register: cuda_file_check
  16. delegate_to: localhost
  17. become: false
  18. when: cuda_installer_path is defined
  19. - name: Fail if CUDA installer not found
  20. fail:
  21. msg: "CUDA installer not found at {{ cuda_installer_path }}"
  22. when: cuda_installer_path is defined and (not cuda_file_check.stat.exists | default(false))