Skip to content

Commit

Permalink
Adds variables to control reboot (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
jovial authored Aug 2, 2023
1 parent 17d1349 commit aa8b5bf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions roles/vgpu/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
vgpu_driver_url: ""
vgpu_driver_force_install: false
vgpu_driver_dkms: false
vgpu_do_reboot: true
vgpu_reboot_timeout: 3600

# Deprecated: use vgpu_definitions instead.
vgpu_mig_definitions: []
Expand Down
6 changes: 4 additions & 2 deletions roles/vgpu/tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,11 @@

- name: Reboot after driver install # noqa: no-handler
ansible.builtin.reboot:
reboot_timeout: 3600
reboot_timeout: "{{ vgpu_reboot_timeout }}"
post_reboot_delay: 60
when: install_result is changed
when:
- install_result is changed
- vgpu_do_reboot | bool

- name: Install nvidia-mig-manager (Redhat)
ansible.builtin.package:
Expand Down

0 comments on commit aa8b5bf

Please sign in to comment.