Well I would like to know if there is way to use to the Remote Execution Plugin to orchestrate the patching of a server and its after restart with out losing the control of the Job and see it as failed task. As you could see at the screenshot below.
Even with this in place the job may still fail under certain circumstances, so I’ve seen people cloning the power action template and replacing its contents with the following and using the clone instead.
echo <%= input('action') %> host && sleep 3
<%= case input('action')
when 'restart'
'shutdown -r +1'
else
'shutdown -h now'
end %>
Using the option you suggested of rendering the power action template for restarting the server at the end of my script works perfectly.
But now, and as I meant with not losing the control of the job during the server restart i would like to continue executing tasks aftrr the reboot of the sever as post reboot tasks in the same job.
To check for instance the server fulfill some requirements fter the reboot. Like checking for up and running services, etc…
Is this possible, to make the job wait for the server come to live again without failing?
sadly what you’re describing is not possible so far and has to be done by running a follow-up job by hand after the first one finishes. We have an issue[1] for tracking this feature, but as far as I know noone started working on that yet.
I don’t intend to hijack your thread but since we are discussing remote execution here, can you please tell what type of remote execution you have tried so far?
Also, can you please point me to a documentation for setting up remote execution? There are few versions of the remote execution plugin and I got confused about what to pick up and what not to.
And about your other question, I just want to run a script which patch the the target server, reboot it and then perform some post-booting tests on the server as part of the same job.