Using group_vars alongside inventory directories

Hi,

Is it possible to use a group_vars/ directory alongside inventory directories (as opposed to files)?

Take this simplified example, which has an inventory file (staging) and an inventory directory (production):

`

$ tree
.
└── inventories
├── group_vars
│ └── all.yml
├── production
│ └── hosts
└── staging

`

staging and production/hosts both contain a single host:

`

[localhost]
127.0.0.1

`

group_vars/all.yml defines a variable example_var:

`

group_vars/ should live inside production/. I don’t know any simple way to share those vars (you can always symlink some of them)

Niko Felger niko@eyequant.com napisał:

Perfect, thanks Tomasz! This did the trick for me:

`

$ tree
.
└── inventories
├── group_vars
│ └── all.yml
├── production
│ ├── group_vars → …/group_vars
│ └── hosts
└── staging

`