From aa8b5bf54b54c9fb0dce876d13ccfd08a1ab40f7 Mon Sep 17 00:00:00 2001 From: Will Szumski Date: Wed, 2 Aug 2023 10:34:30 +0100 Subject: [PATCH] Adds variables to control reboot (#12) Based on feedback in: https://review.opendev.org/c/openstack/kayobe/+/887200 --- roles/vgpu/defaults/main.yml | 2 ++ roles/vgpu/tasks/install.yml | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/roles/vgpu/defaults/main.yml b/roles/vgpu/defaults/main.yml index e2202f6..7a01b1f 100644 --- a/roles/vgpu/defaults/main.yml +++ b/roles/vgpu/defaults/main.yml @@ -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: [] diff --git a/roles/vgpu/tasks/install.yml b/roles/vgpu/tasks/install.yml index 83adb59..59e2b8a 100644 --- a/roles/vgpu/tasks/install.yml +++ b/roles/vgpu/tasks/install.yml @@ -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: