It seems not possible to change inventory of a workflow globally ( for example to specify it when triggered via API ). Inventories used by workflows seem to be defined at node level in the workflow editor (or at job template level if not editable by job template definition).
So if I want to use the same workflow but to target 2 different inventories, I have to duplicate my workflow and change the target inventory for each node of the workflow.
We’re currently working on a feature which would I believe would cover your use case. The issue can be followed here. Currently, when you create a workflow node and select a particular job template, the default inventory for that job template is always used. With 169, if the job template selected has ask_inventory_on_launch set to true then you’ll be able to select a different inventory to be used when that workflow node is executed. I hope this helps.
Hi Mike, now that the feature is present to select a different inventory in the UI via the prompt feature, how can this be done from tower-cli or via the API? It seems like the option to create the workflow with a different inventory still isn’t present. Is this also planned or not?