Thanks Jon.... I am able to complete my task now....... Abhay Gupta....
On Sunday, October 29, 2017 at 3:07:20 PM UTC+5:30, J Hawkesworth wrote: > > Oh, I meant to say you can use the block...rescue ... allways with 'debug' > module to display the messages you want. > > See http://docs.ansible.com/ansible/latest/playbooks_blocks.html > and http://docs.ansible.com/ansible/latest/debug_module.html > > Jon > > On Sunday, October 29, 2017 at 9:34:19 AM UTC, J Hawkesworth wrote: >> >> You can do something like this (thanks to Matt Martz who originally >> suggested it) >> >> - name: check if app is up and ready to serve the wsdl >> uri: >> url: 'http://{{ inventory_hostname }}/app/app.wsdl' >> return_content: yes >> timeout: 2 >> delegate_to: localhost >> register: poll_result >> until: poll_result['status']|default(0) == 200 >> retries: 40 >> delay: 3 >> >> This tries the url every 3 seconds for a maximum of 40 attempts. >> >> Hope this helps, >> >> Jon >> >> On Friday, October 27, 2017 at 11:55:37 AM UTC+1, abhay gupta wrote: >>> >>> Hello Friends, >>> >>> I need your help to finish my task. >>> >>> In my playbook, we are starting a web server which took almost 4-7 >>> minutes. >>> I need to write a task, in which we need to hit a wsdl in after 1 minute >>> and if we are getting the 200 response message as a response. need to print >>> a message" Web server is up and running". >>> And if after some time, let's say till 10 minutes if the wsdl is not >>> getting the 200 response message, it should say, "Web server is not >>> correctly deployed." >>> >>> Thanks. >>> Abhay. >>> >>> -- 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/1d63a369-46f0-459c-a7f3-a12ad2e57e8f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
