How to configure reboot automatically after patch update use theforeman Web UI?

Problem:
I want to configure reboot automatically after patch update,because the trace state changed ‘reboot required’ of some hosts after update kernel. But i can’t find features like it.
I have to use two steps to update and reboot Hosts now but my leader don’t like this.
I can’t find a way to implement a series of operations use one step.
Look forward to your help. THANKS!

Current outcome:
I must do the following two steps:
first step:


second step:

Expected outcome:
reboot automatically after patch update and i can do it all at once.

Foreman and Proxy versions:
Foreman 2.0.0 - Katello 3.15.1

Foreman and Proxy plugin versions:

Distribution and version:
CentOS 7.8

Other relevant data:

If you know when to reboot you could create a new job template, cloning the existing “Update Package - Katello SSH Default” template and add a reboot at the end.

If you want you can also modify the template to check with tracer after the update whether a reboot it required or not…

2 Likes

Thanks! It worked for me. :grin:
Please forgive me for replying to your message so late. Because I was very busy the other days.

I refer to your suggestion and wrote a job template after cloned the existed “Run Command - Ansible Default”.

first:
I use the “yum list updates kernel” command to check the kernel need update or no.

then:
I update all packages and reboot the machines if it need update kernel.

Below is my job template :

Finally.
Could you give me some advices again about how to get the trace_status when I write job template .