Could you add a task straight after to use the assert module to check the 
contents of curl_output?

Jon



On Friday, December 18, 2015 at 12:01:23 PM UTC, jepper wrote:
>
> 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
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/cd42ee61-0230-428f-869b-4b3c8f2f8089%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to