The only way to get the ansible plugin to transform environment/parameter variables in the inventory file in the ansible plugin is to use inline content. This is a problem if you have multiple jobs that rely on the same inventory. If a change needs to be made each job must be updated separately. It would be better to have one inventory file that is in the workspace but which contains environment/parameter variables that are transformed at build time just like the inline content. That way, you only need to make the change in one place for multiple jobs that need to use the same inventory.
This is related to