In the yum update playbook (stroom-ansible-master/stroom/roles/setup/yum_update/tasks/main.yml) it would be better to only reboot if there is a need as per
---
- name: "Do a YUM update on all installed packages"
become: true
yum:
name: "*"
state: latest
tags:
- never # Task won't run unless one of the other tags is set
- yum_update
register: upgraded
# The next three tasks will ONLY run if you supply the allow_reboot tag
- name: restart system to reboot to newest kernel
become: true
shell: "sleep 5 && reboot"
async: 1
poll: 0
tags:
- never
- allow_reboot
when: upgraded.changed
register: reboot
- name: wait for 10 seconds
pause:
seconds: 10
tags:
- never
- allow_reboot
when: reboot.changed
- name: wait for the system to reboot
wait_for_connection:
connect_timeout: 20
sleep: 3
delay: 0
timeout: 120
tags:
- never
- allow_reboot
when: reboot.changed
In the yum update playbook (stroom-ansible-master/stroom/roles/setup/yum_update/tasks/main.yml) it would be better to only reboot if there is a need as per