Understanding group vars

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?

I thought host-specific variables are in a directory called host_vars
(or host_vars/foobar for the host foobar), while group-specific
variables go into the directory group_vars.

So I am surprised you mixed these by having a selenium_hub folder in
your prod-group_vars folder. Maybe that's causing the issue?

Johannes