Hi,
I’ve put together an Ansible module that performs health check on HTTP servers: https://github.com/trueaccord/ansible-health-check
We use it in production as part of our continuous deployment process: each time we push a new release our playbook deregisters one server at a time from AWS’s Elastic Load Balance, perform the upgrade, runs a couple of healthchecks on a few internal URLs, and once everything looks good it registers the instance again in ELB.
Hope this is helpful. If there is interest, I’ll be happy to work on getting it into core.
-Nadav
Looks nice and clean.
In theory one could do the same with the uri module + until
by AFAIK that doesn’t work out in combination with with_items loops and register, which I needed.
Will have a try at it next week.
Serge
“In theory one could do the same with the uri module + until”
This.
I’m not understanding why this module needed to exist, really, if it were not for not knowing about the until construct.
Help me understand?
Guilty as charged - I somehow missed ‘until’… Hopefully this is still useful for cases like Serge described. In our case where we want to expect a specific string in the response, I find it a little more elegant than using register and find.