I am looking for a way for below to cause a failure, if the health check fails to see an “UP” message after 10 attempts.
- name: health check - wait for endpoints to become available
action: shell curl http://endpoint/health"
register: curl_output
until: curl_output.stdout.find(“UP”) > -1
changed_when: false
retries: 10
delay: 10