From 58431d1d78a6ee55baf7304590f2f39e8f8f603e Mon Sep 17 00:00:00 2001 From: Ethan Paul <24588726+enpaul@users.noreply.github.com> Date: Sat, 21 Mar 2020 13:09:14 -0400 Subject: [PATCH] Add reboot to kernel installation tasks --- tasks/centos-8-kernelplus.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tasks/centos-8-kernelplus.yml b/tasks/centos-8-kernelplus.yml index a358a0c..ef67138 100644 --- a/tasks/centos-8-kernelplus.yml +++ b/tasks/centos-8-kernelplus.yml @@ -27,6 +27,7 @@ - kernel-plus - kernel-plus-devel state: latest + register: _dnf_kernel_plus - name: Uninstall kernel-tools become: true @@ -44,6 +45,12 @@ - kernel-plus-tools-libs state: latest +- name: Reboot into new kernel + become: true + when: _dnf_kernel_plus.changed is true and "centos.plus" not in ansible_kernel + reboot: + reboot_timeout: 3600 + - name: Uninstall kernel become: true dnf: