# need ansible to wait for a springboot acutuator heathcheck to show up

**URL:** <https://forum.ansible.com/t/need-ansible-to-wait-for-a-springboot-acutuator-heathcheck-to-show-up/29528>\
**Category:** Ansible Project\
**Created:** [January 25, 2019, 1:25pm UTC](https://forum.ansible.com/t/need-ansible-to-wait-for-a-springboot-acutuator-heathcheck-to-show-up/29528 "2019-01-25T13:25:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![IP\_Freely](https://avatars.discourse-cdn.com/v4/letter/i/e19adc/32.png) [@IP\_Freely](https://forum.ansible.com/u/IP_Freely)\
**Post date:** [January 25, 2019, 1:25pm UTC](https://forum.ansible.com/t/need-ansible-to-wait-for-a-springboot-acutuator-heathcheck-to-show-up/29528/1 "2019-01-25T13:25:16Z")

</div>

Hi Hope you can help me again

I need to wait for a spring application to start before moving on in my playbook.  
when the microservice starts it runs flyway script that can take a long time to run before the service actually starts working.

would the uri module be able to check a specific url for specific text?

so if i wanted to check: **localhost:8093/service/actuator/health**

for this text:

“status” : “UP”

and not just look for a 200 message?

is this possible? if so how

Many thanks in advance

John

---

<div class="post-metadata">

**Author:** ![Adam\_E](https://avatars.discourse-cdn.com/v4/letter/a/c68b51/32.png) [@Adam\_E](https://forum.ansible.com/u/Adam_E)\
**Post date:** [January 25, 2019, 5:27pm UTC](https://forum.ansible.com/t/need-ansible-to-wait-for-a-springboot-acutuator-heathcheck-to-show-up/29528/2 "2019-01-25T17:27:18Z")

</div>

something like this should work

- name: “wait for status”  
shell: bash -c ‘curl -s http://{{ server\_name }}: **8093/service/actuator/health** |egrep “^status”’  
register: cmd\_res  
retries: “60”  
delay: 1  
until: cmd\_res.stdout.find('“status”: “UP”) != -1
