I was thinking of a wait_for: task *before* the uri: check, just to give tomcat enough time to start a http connector (I don't think wait_for on its own would work, as there's no option to send a GET to the port).
The more I think about it, the more I prefer your idea; I've seen plenty of WARs that take ages to fire up after the port is open. On 1 March 2017 at 13:05, Kai Stian Olstad <[email protected]> wrote: > On 01.03.2017 11:29, Paul Tötterman wrote: >>> >>> >>> Instead of pause you could use until: so it retries until you get 200. >>> https://docs.ansible.com/ansible/playbooks_loops.html#do-until-loops >> >> >> >> Or wait_for: https://docs.ansible.com/ansible/wait_for_module.html > > > Can you use wait_for to check if a web server application return status code > 200? > If so how? It's not clear to me after reading the documentation. > > -- > Kai Stian Olstad > > -- > 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/9099b9c07a63166dfe4372a01916d91b%40olstad.com. > > For more options, visit https://groups.google.com/d/optout. -- 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/CAK5eLPQUbFoPxPD68rYeVcg7KpOC4%3Dwd3f7UNSoh4B1g6_ty_g%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
