There is a comment on an Ansible GitHub issue suggesting that an inventory plugin can access extra vars from a custom plugin, but the issue was closed without any details being added.
I have an inventory plugin and a lookup plugin and I’d like both to be able to use extra vars. Both share configuration values which I’d like to specify just once, and an extra_vars would be preferable to environment variables.
Can anyone provide an example of how to do this, if it is possible?
https://github.com/ansible/ansible/issues/10282#issuecomment-469707256