Reputation: 51
I want to restart a service on a windows node. I can write a recipe as below:
service 'w3svc' do
action [:enable, :restart]
end
and from the workstation execute it on the remote node with push jobs. But how can i know on the workstation whether the service was restarted successfully?
thanks,
Upvotes: 0
Views: 327
Reputation: 54249
If a Chef resource fails in some way, it aborts the converge and exits the process with a non-zero status code. In turn, when a Push Jobs job fails you can see it in the API. Wire it all together :)
Upvotes: 1