# Automatic Inventory generation in classical ansible inventory structure based on user input

**URL:** <https://forum.ansible.com/t/automatic-inventory-generation-in-classical-ansible-inventory-structure-based-on-user-input/28177>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [July 27, 2018, 1:29pm UTC](https://forum.ansible.com/t/automatic-inventory-generation-in-classical-ansible-inventory-structure-based-on-user-input/28177 "2018-07-27T13:29:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Safdar\_Dabeer](https://avatars.discourse-cdn.com/v4/letter/s/f08c70/32.png) [@Safdar\_Dabeer](https://forum.ansible.com/u/Safdar_Dabeer)\
**Post date:** [July 27, 2018, 1:29pm UTC](https://forum.ansible.com/t/automatic-inventory-generation-in-classical-ansible-inventory-structure-based-on-user-input/28177/1 "2018-07-27T13:29:04Z")

</div>

Hi!

I have a use case where i want to generate an ansible inventory based on the user input. But inventory is not just like a hosts file where we defined the mapping of groups to host. I want to define a file for each host and then each host has a set of variables, similarly i also want to define files for each group and then to define a list of variables in each group. All in all, a fully customized way to create inventory with default variables already defined and also functionality to define new variables on run time along the way.

Is there such a CMD/GUI tool or something exist ? .I already know about AWX, while for AWX it doesn’t generate an inventory in such a way as I explained and also they are stored in docker volumes, and can;t be physically accessed (AFAIK) like a file structure i want.

---

<div class="post-metadata">

**Author:** ![Christopher\_Meyers](https://avatars.discourse-cdn.com/v4/letter/c/3e96dc/32.png) [@Christopher\_Meyers](https://forum.ansible.com/u/Christopher_Meyers)\
**Post date:** [August 1, 2018, 4:12pm UTC](https://forum.ansible.com/t/automatic-inventory-generation-in-classical-ansible-inventory-structure-based-on-user-input/28177/2 "2018-08-01T16:12:40Z")

</div>

AWX Inventory is stored in the database. You can source inventory from SCM (i.e. git) repos that are dynamic inventory scripts, or more simple Ansible inventory files with host\_vars dirs and such.

As to your question. I’m failing to see how AWX can meet your particular need. I think this is more of an Ansible ecosystem question and would be best asked on the Ansible mailing list.
