Having hard time trying to add my dynamic inventory to tower - under inventory scripts is allows only to paste content of single file. What is I have git project for inventory which consist of multiply files?
I’m querying CMDB via API and don’t want to have token for auth be part of code which is pushed to git as well.
Found project are stored in /var/lib/awx/projects, is there a place where dynamic inventories are stored?
Very much agree that you should not check your tokens into source control.
Over time, our #1 recommended practice for this has converged on this:
Create a project with aforementioned source control
Create a credential type which defines your auth token and its use
Create a credential with your own personal token
Create an inventory source, source from project
Associate that credential with the inventory source
Update the inventory source
This way, the passwords are saved in the database with the standard AWX encryption method.
For multiple files, it depends. The relative path you give for the inventory can be a directory. That assumes you want to use ALL files in the directory as inventory files. Otherwise you can create multiple sources.