diff --git a/tasks/kernel_updates.yml b/tasks/kernel_updates.yml index 6a9399c1..a7369cc9 100644 --- a/tasks/kernel_updates.yml +++ b/tasks/kernel_updates.yml @@ -5,20 +5,12 @@ register: _pve_kernel_update when: "pve_reboot_on_kernel_update | bool" -- name: "Reboot for kernel update in single node mode" - reboot: - msg: "PVE kernel update detected by Ansible" - when: - - "pve_reboot_on_kernel_update | bool" - - "_pve_kernel_update.new_kernel_exists" - - "not pve_cluster_enabled | bool" - -- name: "Reboot for kernel update in cluster mode" - throttle: 1 +- name: "Reboot for kernel update" reboot: msg: "PVE kernel update detected by Ansible" pre_reboot_delay: "{{ pve_reboot_on_kernel_update_delay }}" post_reboot_delay: "{{ pve_reboot_on_kernel_update_delay }}" + throttle: "{{ pve_cluster_enabled | bool | ternary(1, omit) }}" when: - "pve_reboot_on_kernel_update | bool" - "_pve_kernel_update.new_kernel_exists"