# inventory.yml
   europe:
     children:
       germany:
         children:
           on-premise:
             hosts:
               127.0.0.1:
           datacenter:
             hosts:
               127.0.0.2:
       france:
         children:
           on-premise:
             hosts:
               127.0.0.3:
           datacenter:
             hosts:
               127.0.0.4:


Running the following command with different `--limit` options:

ansible-playbook -i inventory.yml random-playbook.yml --limit 'some-limit


- `europe` I expect to run 127.0.0.1, 127.0.0.2, 127.0.0.3, 127.0.0.4
- `on-premise` I expect to run 127.0.0.1, 127.0.0.3
- `datacenter` I expect run 127.0.0.2, 127.0.0.4
- `germany` I expect to run 127.0.0.1, 127.0.0.2
- `france` I expect to run 127.0.0.3, 127.0.0.4

Now, my issue:

- Europe works as expected
- on-premise works as expected
- datacenter works as expected
- germany runs 127.0.0.1, 127.0.0.2, 127.0.0.3, 127.0.0.4
- france runs 127.0.0.1, 127.0.0.2, 127.0.0.3, 127.0.0.4

After playing with it for a while, it seemed like this behaviour is gone 
once you don't have 2 on-premise or 2 datacenter children in germany and 
france.

It feels like while creating the host list it is just like 'alright, 
france, on-premise and datacenter are children ... get all the 
children/hosts of that group' ... after which he finds hosts in 
`datacenter` group that never belonged to France in the first place.

I was just wondering if I'm doing this wrong, or whether this is intended 
behaviour

-- 
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/6028d260-9abb-4224-a439-bb91fa59111c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to