Based on these 
docs 
http://docs.ansible.com/ansible/playbooks_best_practices.html#group-and-host-variables
 
I would think this should work.
I have a yml file with 
db:
  host: 123.45.6.7
  pass: secret

etc.. I put one in selenium_hub and one in website see below I am getting 
back the wrong vars - ansible selenium_hub -m debug -a 
"var=hostvars[inventory_hostname]"

shua@acm1-mgmt-us-east-1 17:26:10 (master) 
~/infrastructure/ansible/group_vars
$ tree
.
├── all
│   ├── common.yml
│   ├── sudo.yml
│   └── users.yml
├── dev
│   ├── sudo.yml
│   ├── users.yml
│   └── website
│       ├── vars.yml
│       └── vault.yml
├── prod
│   ├── selenium_hub
│   │   └── vars.yml
│   ├── selenium_node
│   │   └── vars.yml
│   ├── sudo.yml
│   ├── users.yml
│   └── website
│       ├── vars.yml
│       └── vault.yml
└── us-east-1.yml

7 directories, 14 files
```
however when I do 
```
$ ansible selenium_hub -m debug -a "var=hostvars[inventory_hostname]"
```
I get variables that are defined under prod website - what am I doing wrong?

-- 
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/c0d50d6a-433e-4f68-9712-0e30be23a04e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to