-
Notifications
You must be signed in to change notification settings - Fork 31
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
suggestion: use a common prefix for every variable in the role #238
Comments
I think I agree, but the change would likely be very disruptive. The next release is going to be 4.0 with some breaking changes in OOD, so maybe that's a good time to introduce breaking changes here... |
What you suggest makes total sense. Please feel free to contact me in case you want contributions for this task in the future. I have some experience with ansible and I would be happy to help Feel free to close this issue. |
Thanks! I figure it'll be a slog where it's not all done in one go, but in many smaller PRs.
I'll keep it open and actually pin it in case others want to chime in. |
+1 on this, it really needs it especially for variables which are really likely to clash like servername. Maybe some of those could be tackled first to reduce the scale of the issue? |
Hi,
it's a recommended practice in ansible that every variable in a role uses a common prefix so it's easier to map a variable to the role defining it
You can find some docs here
https://ansible.readthedocs.io/projects/lint/rules/var-naming/
And and example here where where mysql role uses prefix
mysql_
for every variablehttps://github.com/geerlingguy/ansible-role-mysql/blob/master/defaults/main.yml
I think it would make sense that every variable in this role would use preix
ood_
(or something similar). I can work on this refactor in case there is interest to get it merged upstream.I understand this would be a breaking change and maybe you prefer to keep things as they are and that's totally fine and understandable. Just let me know your opinion.
The text was updated successfully, but these errors were encountered: