Friends:
Thank you in advance for your time and attention.
I am writing a playbook do the following on 6 tomcat servers.
a. start tomcat
c. complete the play run after the above steps.
I can start tomcat which is not a problem. I use the service module.
It works fairly well since I am giving 10 min for curl to time out and that url I have put responds in about 7 or 8 mins. (worst case timings)
The output of the curl command is something like (gives out the version of the app installed)
3.9.21
With Ansible I want to be able to do this
On batch tomcat the curl comes back in 4 mins
On webtier tomcat the curl comes back in 6 mins
On backend tomcat the curl takes the longest at 8 mins.
I want to be able to loop thru each of them run the curl command get the output and if no response wait. If I get response I want to go to the next server and check that.
I am not sure how to be in a loop going from one tomcat to another based on the output.
Please help.
-N