I have 2 servers hosting a website. I want to do a rolling upgrade with Ansible like the following:
I want roll out updates to my two servers with ansible. I want them to upgrade one at a time-> then take the building node off the load balancer-> run the tasks. Over here I want to wait it for server start up and send a request to a test URL 5 seconds periodically till there's a valid response. Here it fails the tasks because a timeout occurs after 3 minutes. I want these tasks to complete successfully and then build the next node.
I can do the timeout part with a custom script but isn't there some ansible functionality that does it automatically.