This doesn't seem to be a do/until problem, since the command is failing because a binary is not present.
Example:
- hosts: all
tasks:
- shell: /usr/bin/wrong
register: blip
delay: 1
retries: 4
until: blip.stdout.find("3")
However, it's also not apparently true that ignore_errors is used when deciding to retry, so this is a buglet, which I'll file because we need to deal with it:
- hosts: all
tasks:
- shell: /usr/bin/false
register: blip
delay: 1
ignore_errors: True
retries: 4
until: blip.stdout.find("3")
ignore_errors: True
Hi all,--I have this task:- name: wait for http port 80 return ok for 1 minutesshell: /usr/local/bin/check_health /health 80 {{ inventory_hostname }}delegate_to: "{{ item }}"with_items: groups.sc2_docker_lbregister: outputuntil: output.stdout.find("Ready to go") != -1retries: 6delay: 10tags: web_war_deployAnd 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 directorymsg: Task failed as maximum retries was encounteredfailed: [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 directorymsg: Task failed as maximum retries was encounteredfailed: [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 directorymsg: Task failed as maximum retries was encounteredfailed: [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 directorymsg: Task failed as maximum retries was encounteredFATAL: 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-proje...@googlegroups.com.
To post to this group, send email to ansible...@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.