Hi All,
We have an AWX instance hosted on Ubuntu. We don’t have access to the server and just the AWX UI access. Here I need to create an inventory with groups having more than 100+ servers. In the UI, using ‘add newhost’ options is taking a long time to add server by server. Are there any API which will add those 100+ under one group. Could you please throw some light on this.
Note - We don’t have access to AWX server to run awx-manage cli cmd to create the multiple servers in the inv file.
Assuming that you have your playbooks in a git repository somewhere, then, what you can do is use the repository to store your inventory file(s).
To access the file(s) do the following.
Create a new inventory and save it.
Click the Sources tab and click the Add button.
Give it a name and for Source, select ‘Sourced from a Project’.
In the extra fields that appear, select the Project you are using and in the filename field enter a name which is relative to the project root in the repository.
All you need to do now is find a way to populate that file with the data you want.
Once you have data in the file, you can modify the template to use the new inventory.