Support requiring explicit permission to reboot#50
Conversation
Adds equivalent variables to vgpu_do_reboot to the other roles, and adds a task to fail if the user has not explicitly allowed the reboot. All reboots default to true to avoid breaking existing behaviour.
There was a problem hiding this comment.
Code Review
This pull request introduces reboot safety checks across the grubcmdline, sriov, and vgpu Ansible roles to abort execution if a required reboot is disabled via configuration variables. However, the current implementation in roles/sriov/tasks/config.yml and roles/vgpu/tasks/install.yml aborts unconditionally when rebooting is disabled, which breaks Ansible's idempotency on already-configured systems. It is recommended to first check if the configuration files or driver installations are already complete before failing the playbook.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Alex-Welsh
left a comment
There was a problem hiding this comment.
Generally I think these should be documented in the role's readme, but the roles seem to be pretty bad at this to begin with e.g.
grubcmdline readme:
Role Variables
--------------
Please see `defaults/main.yml`|
Do you also want to bump the version in this PR so we can make a new release? https://github.com/stackhpc/ansible-collection-linux/blob/main/galaxy.yml |
Adds equivalent variables to vgpu_do_reboot to the other roles, and adds a task to fail if the user has not explicitly allowed the reboot.
All reboots default to true to avoid breaking existing behaviour.