Hello,
I would like to run one template to be able to install mutliple similar applications with different components in different environments.
for exemple:
- application1 has a batch and a web module that runs on 2 differents hosts in each environment (dev/tst/acc/prd)
- application2 also has a batch and a web module that runs on 4 different hosts in each environment (dev/tst/acc/prd)
I’ve created a job template in AWX that request 2 extra_vars to install any application: app_name & env.
the job calls a playbook that will take action on batch and other actions on web servers.
I would find very convenient to use a dynamic inventory directly in the template so that at job runtime it would call my inventory script with the 2 args (app + env)
it would then return a very basic json with my
{
“batch”: [
“server1.domain”
],
“web”: [
“server2.domain”
]
}
Or do you see any other mechanism to be able to run the same template to do so ?
if you need more info, don’t hesitate.
Brgds
JF