group intersection not working in some situations

26 views
Skip to first unread message

gua...@ualberta.ca

unread,
Aug 1, 2014, 6:34:27 PM8/1/14
to ansible...@googlegroups.com

Let me assume that we have a inventory file called hosts:

hosts
[openstack]
keystonec
sproxyc
snode01c
snode02c
snode03c
keystone
sproxy
snode01
snode02
snode03

and a dev inventory file

[dev]
keystone
sproxy
snode01
snode02
snode03


I have a test.yml file

---
  - hosts: openstack:&dev
    tasks:
      - name: ping each host in the dev
        action:  ping


When I play the book as blow

ansible-playbook -i ./inventory   test.yml

It found no matched the hosts.

If I put [dev] definition in the same file as [openstack], it works well.

anyone can help?

regards
Henry

Michael DeHaan

unread,
Aug 1, 2014, 6:43:42 PM8/1/14
to ansible...@googlegroups.com
Can you try this on the development branch?

We've recently applied some patches to clean up inventory that should address this problem when using multiple inventory files at once.

1.7 is due for release soon, so it's pretty much set to go.




--
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/53eeb212-8c98-414a-8cbc-11a1f0941c57%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages