inventory in multi-user environment

Hi all - I’m new to AWX/Tower. I have a simple use case but can’t figure out how to implement w/ Tower. I have a group of users who need to install an Oracle client on a set of hosts. The set of hosts changes regularly. So I was thinking these users could be allowed to create inventories and run a specific job template and specifying their inventory at runtime (i.e. prompt on launch). However, it doesn’t appear that Tower allows normal users to create inventories; I certainly don’t want this group of users to be Administrators. So, an alternative would be to create a single inventory and grant the users Admin role on that inventory, but then the users could step on each other (i.e., user A is running the JT while user B updates the inventory in preparation for running the JT).

In a non-Tower environment, each user just creates their own inventory file and passes it to ansible-playbook (-i). How can I achieve this w/ Tower?

Rob

I suppose one option would be for me to store the inventory in git and allow the users to modify it there; there’s still a risk of users stepping on each other. Am I thinking about this wrong? This doesn’t seem like a particularly remote use case; I’m rather shocked Tower can’t handle it.

Rob

Well by default, only one instance of a template can run at a time (unless you enable concurrent jobs). So two users cannot run the same job in the same time, they will get queued. Also once the job is started, ansible already has the list of hosts to connect to so modifying the inventory while a job is running is fine. The only issue left is if someone saves a new version of the inventory right before someone else was about to click start job. That is a pretty small window but it could happen.
If you want to use git, you could set up merge/pull requests and make all these users as the approvers, so when someone wants to change the inventory everyone else (or some of them at least) have to approve.

Adrian - thanks, that helps. Users will be doing their work using the REST API, so the window is actually extremely small. I’ll move forward with creating an inventory and allowing the users to share it.

Rob