Hi, I'm operating a Solr Cluster of 50 servers and I have been confronted to the same question than you. The warmup of the Solr index can take up to 30 seconds and wait_for on the port was not enough. At first, I wrote a new module to launch a query every X seconds and expect a result (wait_for_result command='wget -O - "http://{{ ansible_fqdn }}:{{ active_country_port[country].port }}/searchsolrnode{{ country }}/{{ country}}/select?q=*:*&rows=0"' result="numFound" delay=10 timeout=600) until Ansible came up with it's do...until loop which is perfect in this case : - shell: wget -O - "http://{{ ansible_fqdn }}:{{ active_country_port[country].port }}/searchsolrnode{{ country }}/{{ country}}/select?q=*:*&rows=0" register: result until: result.stdout.find("numFound") != -1 retries: 20 delay: 5
On Thursday, September 18, 2014 5:06:07 AM UTC+2, Brian Coca wrote: > > well, in that case I would use wait_for to let the server come up and > then get_url inside a do-until loop to get the 'green light'. > > > -- > Brian Coca > Stultorum infinitus est numerus > 0110000101110010011001010110111000100111011101000010000001111001011011110111010100100000011100110110110101100001011100100111010000100001 > > > Pedo mellon a minno > -- 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/a20742b7-2b59-4c48-b1f9-a5ccd77f8500%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
