Merge "Never reboot without explicit permission"
This commit is contained in:
commit
3ec0c1258b
6 files changed
+35
-3
No files matched your search
@@ -93,3 +93,8 @@ kayobe_ansible_setup_gather_subset: "{{ omit }}"
|
||||
# This allows us to install packages and create arbitrary directories that our
|
||||
# user would not normally have permission to create. Default is true.
|
||||
kayobe_control_host_become: true
|
||||
|
||||
# Global variable to choose whether or not to reboot hosts when required by
|
||||
# host configuration playbooks, including VGPU and SELinux playbooks. Default
|
||||
# is false.
|
||||
kayobe_do_reboot: false
|
||||
@@ -10,7 +10,7 @@ vgpu_driver_url: ""
|
||||
# Flag to control whether the vGPU playbook should automatically reboot the
|
||||
# hypervisor. Note: this is necessary for the driver to be loaded correctly.
|
||||
# Caution should be used when changing this option.
|
||||
vgpu_do_reboot: true
|
||||
vgpu_do_reboot: "{{ kayobe_do_reboot | bool }}"
|
||||
|
||||
# Time to wait when rebooting the host before failing.
|
||||
vgpu_reboot_timeout: 600
|
||||
@@ -6,7 +6,7 @@ selinux_policy: targeted
|
||||
selinux_state: permissive
|
||||
|
||||
# Whether to reboot to apply SELinux config changes.
|
||||
selinux_do_reboot: false
|
||||
selinux_do_reboot: "{{ kayobe_do_reboot | bool }}"
|
||||
|
||||
# Number of seconds to wait for hosts to become accessible via SSH after being
|
||||
# rebooted.
|
||||
|
||||
@@ -1,4 +1,24 @@
|
||||
---
|
||||
- name: Precheck that reboot is enabled for VGPU configuration
|
||||
hosts: iommu:vgpu
|
||||
max_fail_percentage: >-
|
||||
{{ vgpu_max_fail_percentage |
|
||||
default(host_configure_max_fail_percentage) |
|
||||
default(kayobe_max_fail_percentage) |
|
||||
default(100) }}
|
||||
tags:
|
||||
- reboot
|
||||
- iommu
|
||||
- vgpu
|
||||
tasks:
|
||||
- name: Abort VGPU configuration because reboot is disabled
|
||||
ansible.builtin.fail:
|
||||
msg: >
|
||||
VGPU configuration requires a reboot, but vgpu_do_reboot is
|
||||
false. Please run again with vgpu_do_reboot set to true to reboot.
|
||||
when:
|
||||
- not vgpu_do_reboot | bool
|
||||
|
||||
- name: Configure IOMMU
|
||||
hosts: iommu
|
||||
max_fail_percentage: >-
|
||||
@@ -12,6 +32,8 @@
|
||||
tasks:
|
||||
- import_role:
|
||||
name: stackhpc.linux.iommu
|
||||
vars:
|
||||
iommu_do_reboot: "{{ vgpu_do_reboot | bool }}"
|
||||
handlers:
|
||||
- name: Register that a reboot is required
|
||||
set_fact:
|
||||
|
||||
@@ -85,6 +85,11 @@
|
||||
# user would not normally have permission to create. Default is true.
|
||||
#kayobe_control_host_become:
|
||||
|
||||
# Global variable to choose whether or not to reboot hosts when required by
|
||||
# host configuration playbooks, including VGPU and SELinux playbooks. Default
|
||||
# is false.
|
||||
#kayobe_do_reboot:
|
||||
|
||||
###############################################################################
|
||||
# Networking configuration.
|
||||
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ collections:
|
||||
- name: openstack.cloud
|
||||
version: '<3'
|
||||
- name: stackhpc.linux
|
||||
version: 1.5.2
|
||||
version: 1.6.0
|
||||
- name: stackhpc.network
|
||||
version: 1.0.0
|
||||
- name: stackhpc.openstack
|
||||
|
||||
Reference in new issue
Block a user