You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Provide your feedback
Currently only the lookup plugins from this collection support passing the connection credentials via environment variables, inventory and module plugins don't:
However, there is a problem with this implementation, when using AWX/Ansible Automation Platform: It is disallowed to create a custom Credential Type with "ANSIBLE_*" env-vars injector configurations:
Environment variable ANSIBLE_LOOKUP_CHECKMK_AUTOMATION_SECRET may affect Ansible configuration so its use is not allowed in credentials.
Which makes sense, as ANSIBLE_* env-vars are "traditionally" reserved for ansible-core configurations and not for third party collections. Judging from several other third party collections, the usual naming scheme seems to be just a prefix of the managed product/namespace, e.g. "CHECKMK_". For a transition period I would suggest adding env-vars with a compatible naming schema (e.g. CHECKMK_SERVER_URL, CHECKMK_SITE, CHECKMK_AUTOMATION_SECRET, etc) and keep the current names as fallbacks.
Additionally it would make sense to implement the support for the env-vars in inventory plugins and modules as well. Plugins all use the same way to parse enviroment variables for parameters (via DOCUMENTATION docstring, also able to externalize that via doc_fragments), modules use the argspec fallback option with env_fallback, as for example seen here: https://github.com/ansible-collections/community.vmware/blob/main/plugins/module_utils/_argument_spec.py
Collection Version
v5.8.0
The text was updated successfully, but these errors were encountered:
Hi @penguincustodian and thanks for bringing this to our attention!
Do you think you are up to the task of changing this yourself and creating a pull request?
We are usually pretty pressed for resources and have little time to work on these quality-of-life improvements.
So feel free to get started on a PR, otherwise someone will pick this up at some point.
Uh oh!
There was an error while loading. Please reload this page.
Provide your feedback
Currently only the lookup plugins from this collection support passing the connection credentials via environment variables, inventory and module plugins don't:
This was implemented in #546.
However, there is a problem with this implementation, when using AWX/Ansible Automation Platform: It is disallowed to create a custom Credential Type with "ANSIBLE_*" env-vars injector configurations:
Which makes sense, as ANSIBLE_* env-vars are "traditionally" reserved for ansible-core configurations and not for third party collections. Judging from several other third party collections, the usual naming scheme seems to be just a prefix of the managed product/namespace, e.g. "CHECKMK_". For a transition period I would suggest adding env-vars with a compatible naming schema (e.g. CHECKMK_SERVER_URL, CHECKMK_SITE, CHECKMK_AUTOMATION_SECRET, etc) and keep the current names as fallbacks.
Additionally it would make sense to implement the support for the env-vars in inventory plugins and modules as well. Plugins all use the same way to parse enviroment variables for parameters (via DOCUMENTATION docstring, also able to externalize that via doc_fragments), modules use the argspec fallback option with env_fallback, as for example seen here: https://github.com/ansible-collections/community.vmware/blob/main/plugins/module_utils/_argument_spec.py
Collection Version
v5.8.0
The text was updated successfully, but these errors were encountered: