hosts_vars subdirectories

19 views
Skip to first unread message

Vincent Gatignol

unread,
Dec 1, 2017, 5:21:15 AM12/1/17
to Ansible Group
Hi folks,

Is there a way to organize the host_vars directory into subdirectories ?
If not, where to ask for it ?

We have a large number of hosts (500+) and our usage actually suffer from this flat organization.

I would suggest to treat any files from /hosts_vars/*/* to be treated as they where sitting at the top level /host_vars/
So we could organize our hosts_vars by location/role (I'm *not* referring to the group_vars... that we intensively use in conjunction !) :
hosts_vars/
- boston
-- (list of baremetal in boston)
- newyork
-- (list of baremetal in newyork)
- clients
-- (list of clients's VM)
(... and so on)

If someone knows a hack or point me to the right direction to adapt ansible to that, we will be glad to post a MR !

If this has already been discussed, please point me to the thread so I can convince you from my user story to allow that :)

Regards,

Vincent

Brian Coca

unread,
Dec 1, 2017, 6:49:13 PM12/1/17
to Ansible Project
in 2.4 this is controlled by a vars plugin (host_group_vars) you can
override with your own version of it that 'ignores' the top directory
and matches subdirs



--
----------
Brian Coca
Reply all
Reply to author
Forward
0 new messages