It would be great if there was an easy way to bulk-add hosts for manual projects in AWX. We'd love the ability to provide a CSV, an inventory file or something similar and have AWX turn that one-off inventory file into a set of hosts in the inventory.
This is already available.
If you want to do it manually, you can use the tower-cli project for that.
But if you want a more stable way, you should really checkout those ansible modules:
Definitely understand that there are a variety of mechanisms to bulk add hosts including tower-cli, the rest api, and ansible playbooks.
Our use-case is more along the lines of allowing users that are not familiar with Ansible to utilize pre-made inventories, job templates, and credentials. We pre-configure most it for them so that all they have to do is add hosts to inventories. This is pretty straightforward for individual hosts but is more difficult when the user has to add many hosts.
So I suppose this feature request is actually to be able to bulk-add hosts to the inventory via the AWX Web UI
+1 for this functionality, I have a use case very similar to @strawgate and being able to import an .ini directly from the web interface would come in handy.
I have also the same use case as @strawgate.
Though, I don't think an "import from file" solution would meet my need, because I want it to stay user-friendly and as much "ansible-abstracted" as possible to users, who are not familiar to ansible/git products, and this solution means the user have to be able to create some sort of ansible inventory file (whatever format it would be...ini,yml,json,csv). I could actually achieve the equivalent of this solution by linking the AWX inventory to a git repository, and ask the users to create the new hosts in a git file (using for example gitlab ui), then 1 commit, then all hosts would be added in awx with an automated process. But I don't want users having to deal with git or any inventory file.
A good solution to me would be having an option to create multiple hosts directly from AWX UI, like you would have the same
UI as /inventories/inventory/1/hosts/add, but with the possibility to set multiple hosts during the same submit, like you would click a "+" and another "host box" (hostname/desc/vars) would appear... Or even just choosing how many hosts you want to create at once, and the UI would be showing the same number of "host boxes", then the user can start filling all the "host boxes", then review everything, then submit.
And on top of that, this would be perfect if you could start a "bulk host add" using an existing host as template, so all the created "host boxes" are already filled with pre-defined description/vars ready to fill/modify for the user.
Actually, thinking about it, just having a "duplicate host" feature (like you can duplicate templates or projects already in AWX) would also meet my need at some points, it would be way faster to create new hosts from UI for users.
Most helpful comment
Definitely understand that there are a variety of mechanisms to bulk add hosts including tower-cli, the rest api, and ansible playbooks.
Our use-case is more along the lines of allowing users that are not familiar with Ansible to utilize pre-made inventories, job templates, and credentials. We pre-configure most it for them so that all they have to do is add hosts to inventories. This is pretty straightforward for individual hosts but is more difficult when the user has to add many hosts.
So I suppose this feature request is actually to be able to bulk-add hosts to the inventory via the AWX Web UI