awx - inventory sources and env variables

hi, wonder if somebody can point me in right direction.

i am given custom rest end point to read inventory of host and for each tower job submission, i have to pass different filter to same endpoint.

i created inventory script, that can read environment variable for filter value, works fine at cmdline.

To use in tower, i am using inventory sources and env variable option there.

but while making job template launch call via tower rest api, i can not find a way to pass that env variable for filter value - it is not part of payload spec.

i can accomplish this at cmdline, but tower api for launch call is where i am stuck.

There may be some ways you can accomplish this. One option might be a smart inventory for the job template. Another option might be to have two plays in the job template and let the first play process the inventory and create an in-memory inventory and then have the second play run against the inventory created.

-The AWX Team