Hi all,

I have this task:

  - name: wait for http port 80 return ok for 1 minutes
    shell: /usr/local/bin/check_health /health 80 {{ inventory_hostname }} 
    delegate_to: "{{ item }}"
    with_items: groups.sc2_docker_lb
    register: output
    until: output.stdout.find("Ready to go") != -1
    retries: 6
    delay: 10
    tags: web_war_deploy

And then when it came to this task, my run failed with the following errors:

< TASK: wait for http port 80 return ok for 1 minutes >
 -----------------------------------------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||


changed: [sc2-dock3-web1 -> {{ item }}] => (item=sc2-dock1-lb)
changed: [sc2-dock3-web3 -> {{ item }}] => (item=sc2-dock1-lb)
failed: [sc2-dock3-web1 -> {{ item }}] => (item=sc2-dock2-lb) => 
{"attempts": 6, "changed": true, "cmd": "/usr/local/bin/check_health 
/health 80 sc2-dock3-web1", "delta": "0:00:00.009735", "end": "2014-08-29 
13:54:27.691545", "failed": true, "item": "sc2-dock2-lb", "rc": 127, 
"start": "2014-08-29 13:54:27.681810"}
stderr: /bin/sh: /usr/local/bin/check_health: No such file or directory
msg: Task failed as maximum retries was encountered
failed: [sc2-dock3-web3 -> {{ item }}] => (item=sc2-dock2-lb) => 
{"attempts": 6, "changed": true, "cmd": "/usr/local/bin/check_health 
/health 80 sc2-dock3-web3", "delta": "0:00:00.011236", "end": "2014-08-29 
13:54:27.843791", "failed": true, "item": "sc2-dock2-lb", "rc": 127, 
"start": "2014-08-29 13:54:27.832555"}
stderr: /bin/sh: /usr/local/bin/check_health: No such file or directory
msg: Task failed as maximum retries was encountered
failed: [sc2-dock3-web1 -> {{ item }}] => (item=sc2-dock3-lb) => 
{"attempts": 6, "changed": true, "cmd": "/usr/local/bin/check_health 
/health 80 sc2-dock3-web1", "delta": "0:00:00.144995", "end": "2014-08-29 
13:55:35.073634", "failed": true, "item": "sc2-dock3-lb", "rc": 127, 
"start": "2014-08-29 13:55:34.928639"}
stderr: /bin/sh: /usr/local/bin/check_health: No such file or directory
msg: Task failed as maximum retries was encountered
failed: [sc2-dock3-web3 -> {{ item }}] => (item=sc2-dock3-lb) => 
{"attempts": 6, "changed": true, "cmd": "/usr/local/bin/check_health 
/health 80 sc2-dock3-web3", "delta": "0:00:00.147576", "end": "2014-08-29 
13:55:35.685953", "failed": true, "item": "sc2-dock3-lb", "rc": 127, 
"start": "2014-08-29 13:55:35.538377"}
stderr: /bin/sh: /usr/local/bin/check_health: No such file or directory
msg: Task failed as maximum retries was encountered

FATAL: all hosts have already failed -- aborting

----

sc2-dock*-lb are my Haproxy servers and I certainly want to have these 
servers checking the web servers before adding them back to the load 
balancers.

Did I use this do-unitl loop correctly?  Was it intended for other purposes?

Thanks,
Steven.

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/99c84bcf-8e09-4e4d-91b0-36b120907ac7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to