Skip to content

Commit

Permalink
Dedup kernel reboot task
Browse files Browse the repository at this point in the history
Closes #153
  • Loading branch information
lae committed Aug 21, 2021
1 parent 57e52a8 commit eda519e
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions tasks/kernel_updates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit eda519e

Please sign in to comment.