2

I have a rundeck job that reboots a server, it sends the command "sudo reboot". This works and the server is rebooting.

The problem is that rundeck doesn't get a signal back so the job fails.

Is there a way to make this work and get a complete signal back in rundeck?

Hoaxr
  • 73
  • 2
  • 7

2 Answers2

1

Perhaps wrap your command in a script, background the reboot operation, and return 0? I'm doing something similar with a set of development VMs, but I'm using virsh. I don't see why this couldn't be done with a physical server:

#!/bin/bash
ssh rundeck@yourserver sudo reboot &
exit 0

You may need to experiment a bit with the ssh options (perhaps '-f' and/or '-n') to get this to work properly.

Jeff W
  • 414
  • 5
  • 16
1

Well playing around now I just used as Local Command step:

ssh ${node.username}@${node.hostname} "reboot & exit"

The return code is ZERO and everybody is happy.

spectroman
  • 11
  • 1