Skip to content

Commit

Permalink
fix: post reboot delay to avoid too-early continue
Browse files Browse the repository at this point in the history
it seems sometime reboot fails as Ansible continue playbook right after reboot - seemingly because the test command is run too early and Ansible thinks reboot worked, whereas it has not started yet, causing reboot to hang or other task to continue.
  • Loading branch information
PierreBeucher committed Nov 30, 2024
1 parent fa6e110 commit a257d28
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ansible/roles/nvidia-driver/tasks/driver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- name: Reboot after nouveau driver blacklist update
when: nvidia_nouveau_driver_blacklist.changed
reboot:
post_reboot_delay: 10

# NVIDIA driver install require gcc and make
# and that gcc version matches the one used to compile kernel
Expand All @@ -28,6 +29,7 @@
- name: Reboot after previous install method package removal
when: previous_install_method_package_remove.changed
reboot:
post_reboot_delay: 10

- name: install driver required packages
apt:
Expand Down Expand Up @@ -114,3 +116,4 @@
- name: Reboot after dotrun driver install
when: nvidia_driver_version != nvidia_driver_dotrun_install_version
reboot:
post_reboot_delay: 10
2 changes: 2 additions & 0 deletions ansible/roles/nvidia-driver/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

- name: reboot after old driver package removal
reboot:
post_reboot_delay: 10
when: install_driver.changed

# required on some system to create /dev/nvidia-caps* automatically, see https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#device-node-verification
Expand Down Expand Up @@ -86,4 +87,5 @@

- name: reboot after initramfs or NVIDIA devices script update
reboot:
post_reboot_delay: 10
when: nvidia_driver_module_file_result.changed or nvidia_dev_systemd_unit.changed or nvidia_dev_script.changed

0 comments on commit a257d28

Please sign in to comment.