I got it working, thanks for the suggestion. Here's what I ended up doing:

- name: wait for endpoints to become available
  action: shell curl "{{ item.endpoint }}/health"
  when: "item.endpoint is defined"
  with_items: "{{ deploy_list }}"
  register: log_output
  until: log_output.stdout.find("UP") > -1
  changed_when: false
  failed_when: "log_output.attempts > {{ deploy_health_check_retries - 1 }}"
  retries: "{{ deploy_health_check_retries }}"
  delay: "{{ deploy_health_check_delay }}"

The next thing that would be nice would be to fork this, as many times as I 
have URLs to check. 

-- 
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/9fcdeb3c-400f-4553-a153-3784c611460c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to