tripleo-kernel: Adding reboot_protection variable
When the role is included, the params and variables have higher precedence than the set_fact, thus not taking the set_fact defer_reboot into account. Adding a reboot_protection variable that is not included when calling the role will prevent this behavior. Resolves: rhbz#1975240 Related: https://bugzilla.redhat.com/show_bug.cgi?id=1975240 Change-Id: If2d9a8a21f19e4fe7699c0ac932c9801fd133474
This commit is contained in:
parent
4e481d662a
commit
39a809f9e7
|
@ -23,3 +23,4 @@ tripleo_kernel_args: ""
|
|||
tripleo_kernel_reboot_timeout: 3600
|
||||
tripleo_kernel_post_reboot_delay: 60
|
||||
tripleo_kernel_defer_reboot: false
|
||||
tripleo_kernel_reboot_protection: false
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
- name: Setting defer reboot fact
|
||||
set_fact:
|
||||
tripleo_kernel_defer_reboot: true
|
||||
tripleo_kernel_reboot_protection: true
|
||||
|
||||
- name: Check if the kernelargs entry is already present in the file
|
||||
replace:
|
||||
|
@ -125,6 +126,7 @@
|
|||
when:
|
||||
- reboot_required is defined and reboot_required
|
||||
- not tripleo_kernel_defer_reboot|bool
|
||||
- not tripleo_kernel_reboot_protection|bool
|
||||
block:
|
||||
- name: Reboot tasks
|
||||
include_tasks: reboot.yaml
|
||||
|
|
Loading…
Reference in New Issue