Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

Commit

Permalink
[scylladb#180] Change the order slightly
Browse files Browse the repository at this point in the history
  • Loading branch information
James Stocker committed Dec 7, 2022
1 parent 63e0778 commit ccf9d78
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions ansible-scylla-node/tasks/RedHat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,6 @@
lock_timeout: 60
register: kernel_installed

- name:
package:
name:
- kernel
- kernel-ml
state: absent

- name: Needs restarting?
command: needs-restarting -r
register: restart_required
ignore_errors: yes

- name: Configure grub2 to boot first entry
lineinfile:
dest: /etc/default/grub
Expand All @@ -69,6 +57,11 @@
command: grub2-mkconfig -o /boot/grub2/grub.cfg
when: kernel_installed.changed

- name: Needs restarting?
command: needs-restarting -r
register: restart_required
ignore_errors: yes

- name: Reboot host and wait for it to restart
reboot:
msg: "Reboot initiated by Ansible"
Expand All @@ -77,7 +70,15 @@
pre_reboot_delay: 0
post_reboot_delay: 30
test_command: whoami
when: (reboot_after_kernel_upgrade|bool and kernel_installed.changed) r restart_required.rc == 1
when: (reboot_after_kernel_upgrade|bool and kernel_installed.changed) or restart_required.rc == 1

- name:
package:
name:
- kernel
- kernel-ml
state: absent

when: elrepo_kernel|bool and install_type == 'online' and (ansible_distribution == "CentOS" or ansible_distribution == "RedHat")
become: true

Expand Down

0 comments on commit ccf9d78

Please sign in to comment.