Hello everyone,

I have a small problem and I am not sure whether this is a bug or "works as 
defined". We have a few Junos devices we are configuring and they require 
ansible_connection=local, but since 2.0 if one of the hosts/inventory items 
fails, he does not simply skip this one host, but all. Here is a simple 
sample to simulate this behaviour without the need for a Junos host:

Inventory (where 10.118.194.22 is down):
[junos]
10.118.194.11 ansible_connection=local
10.118.194.12 ansible_connection=local
10.118.194.21 ansible_connection=local
10.118.194.22 ansible_connection=local

Playbook (as port use something that is reachable ;) ):
---
- name: play1
  hosts: junos
  gather_facts: no
  tasks:
    - name: task1
      wait_for: host={{ inventory_hostname }} port=22 timeout=5
    - name: task2
      wait_for: host={{ inventory_hostname }} port=22 timeout=5

- name: play2
  hosts: junos
  gather_facts: no
  tasks:
    - name: task3
      wait_for: host={{ inventory_hostname }} port=22 timeout=5

What I would expect:

   1. starting play1
   2. running task1, failing on 10.118.194.22
   3. running task2 only for the non-failed hosts
   4. starting play2
   5. running task3 only for the non-failed hosts

What actually happens, is that he is not even starting play2. I suspect 
that the connection=local makes ansible behave like all four hosts are 
actually only one hosts. And since this one host failed skip it in all 
other plays. If you remove ansible_connection=local from each host 
(assuming they are ssh-able) it works as expected.

Is this a bug? Should I put this in Ansible Development?

Best regards,
Jesse

-- 
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/2f11f94b-b817-44e4-bd0d-b22916020440%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to