My understanding is you want to create a Inventory with host entries without having to enter each host individually.
The easiest way I have found is using the awx-manage command from the CLI.
1. First create your inventory in AWX, giving it a name without spaces or special characters in the name. Once the hosts are loaded you can change the name if needed.
For my example below my inventory name is "inventory1"
2. Log into the AWX Host or AWX's task container with a userid that has the ability to make changes to awx (usually either the awx user or any root type user).
3. Create a file with the list of hosts to be added to the inventory. You can use hostnames or ip addresses.
You can also include host variables similar to an ansible hosts file.
[root@awx awx]# cat hosts_add
192.168.3.151
192.168.3.152
192.168.3.153
192.168.3.154
192.168.3.155
[root@awx awx]#
4. Once your list is ready, using the awx-manage command to add the hosts to the inventory you created above.
[root@awx awx]# awx-manage inventory_import --inventory-name inventory1 --source hosts_add
13.320 INFO Updating inventory 1: inventory1
13.965 INFO Reading Ansible inventory source: /var/lib/awx/hosts_add
...
22.581 INFO Inventory import completed for ( inventory1 - 6) in 10.2s
[root@awx awx]#
5. Go back to AWX’s GUI to verify your work.
- Ray