-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Feature Request: Using/Setting more unique variables in Ansible Operators #2692
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Just wondering for this—is Otherwise, one argument against it may be that in an operator context, these variables aren't necessarily ansible-related, but rather operator-related. But I do see what you're saying, all the 'magic' variables/facts that are available to describe a given environment (e.g. |
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
Hi @geerlingguy, I am not sure if I got this one. Are you looking for all ENV VARs which are used/available to ansible starts with the prefix ansible? Could you please point out some examples over how you are checking it in the project X what you expected to see? @fabianvf @estroz I am not sure if it is a blocker for 1.0.0. WDYT? |
@camilamacedo86 - I know @fabianvf, @tima and I were talking about this, and I think the idea was we'd put these vars behind an In Ansible itself, there are a variety of environment-based 'facts' Ansible gathers prior to running playbooks (unless you disable fact gathering). I imagine some things that would be really nice to have available would be things like:
This is just kind of thinking out loud, though. I think the main goal was to get a structure for facts in place, then over time we could add things to it if desired. |
@camilamacedo86 yeah, we're going to get the change from |
Thank you for the clarifications :-) |
/remove-lifecycle stale |
Feature Request
Is your feature request related to a problem? Please describe.
The Ansible Operator SDK stores things like name in
meta.name
. Using something as generic and nondescript as that is considered bad Ansible form and style given the engine’s flat namespace and the potential for collision.Describe the solution you'd like
The idea here would be to transition what’s in stored meta to something like
ansible_operator
or something else sufficiently unique and descriptive. It's worth noting, Ansible itself usesansible_
* for any variables set by the system so it might be worth consideration here.I don't know what is the best way to do this without causing some sort of breaks in existing/working operators using Ansible. I think it's important to consider and is better fixed now, pre "1.0" rather than waiting for namespace collisions to happen later when many Operators using Ansible have been deployed are run into collisions.
The text was updated successfully, but these errors were encountered: