What happened here is you had a task failure on several of the machines,
and the do/until is not ignoring errors (because it's not told to)

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

So this is not a delegation issue.

However, it's also true that "ignore_errors" can't be used with do/until,
and for this I'll file a small bug because I want to make that work for
your use case, if you added ignore_errors: True, which right now does not
seem to help.






On Fri, Aug 29, 2014 at 2:02 PM, Steven Truong <[email protected]> wrote:

> 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 [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/99c84bcf-8e09-4e4d-91b0-36b120907ac7%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/99c84bcf-8e09-4e4d-91b0-36b120907ac7%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> 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/CA%2BnsWgy3_KZmdApJR5yUt0VQE52QKLqJ9%3DUa%2BF2QggX7-xEd7w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to