It could very well be that the "implicit localhost" magic doesn't sit well with the failure percentage code -- please make sure we have a github ticket on this one with details of how to repro.
Thanks! On Fri, Apr 4, 2014 at 3:51 PM, Marc Petrivelli <[email protected]>wrote: > This is an interesting side effect of using local tasks vs plays with > hosts: 127.0.0.1. > > In my case I was running a playbook and on the command line limiting with > -l command. > > ansible-playbook -l host1 site.yml > > in the play book I had the following play: > > hosts: localhost > user: root > tasks: > - file: path="tmp/file1.txt" state=absent > - file: path="tmp/file2.txt" state=absent > > > The plays in the playbook all finished successfully however at the end I > got the error listed in the subject of this post: *FATAL: all hosts have > already failed -- aborting.* > > Looking at the source (lib/ansible/callbacks.py and > lib/ansible/playbook/__init__.py) this error seems to be spit out when (but > not only when) the the expected play_count/host_count minus the actual > play_count/host_count is greater than the max fail pct (in my case 0). > > I figured that having an explicit play with localhost might be confusing > the counts. So I changed my code to: > > - hosts: dhcp_servers > user: root > tasks: > - local_action: file path="tmp/file1.txt" state=absent > - local_action: file path="tmp/file2.txt" state=absent > > The FATAL at the end of the run disappeared. Not sure if it matters but > in my inventory file I do have this line: > > localhost ansible_ssh_host=127.0.0.1 ansible_connection=local > > > Something doesn't seem right here. > > > > > On Friday, April 4, 2014 2:10:12 PM UTC-4, Michael DeHaan wrote: > >> Without more context, it's impossible to tell what you mean, as this is >> exactly the message you get after all the hosts have had failures. >> >> Please supply some more context about your playbook run, execution, and >> so on, and we can discuss further. >> >> >> On Fri, Apr 4, 2014 at 12:02 PM, Marc Petrivelli <[email protected]>wrote: >> >>> I am getting >>> >>> *FATAL: all hosts have already failed -- aborting * >>> >>> even though none of the hosts are showing any errors. This problem >>> starting creeping up in the 1.5.x releases. Any ideas? >>> >>> -- >>> 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/e171e42f-d802-444e-a74c- >>> 79ad02d93a5c%40googlegroups.com<https://groups.google.com/d/msgid/ansible-project/e171e42f-d802-444e-a74c-79ad02d93a5c%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/a80ffc1f-852f-4a5e-8b45-495025fa5e8d%40googlegroups.com<https://groups.google.com/d/msgid/ansible-project/a80ffc1f-852f-4a5e-8b45-495025fa5e8d%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/CAEVJ8QMxFHeyxMd5bxeE%3DTbB69DObw9AVobp8tBeheZnbGgY0g%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
