-
Notifications
You must be signed in to change notification settings - Fork 420
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
salt variables are overwritten all over the place #89
Comments
@iggy, please explain further? |
Apparently I was looking at a rather old clone. My bad. |
I was actually correct the first time. Just wasn't thinking when I was asked for clarification. {% from "salt/map.jinja" import salt with context %} That overwrites the predefined jinja variable "salt", thereby making it impossible to access members of that dict (i.e. |
@iggy Can you please explain further what's happening? |
Pretty much every file has the following at the top: {% from "salt/map.jinja" import salt with context %} That overwrites the main salt jinja variable. So anything you would normally use {{ salt }} for stops working.
|
I think iggy is recommending instead of possibly over writing the global {{ salt }} variable, we use a different variable name in the files. So instead of
We use an explicit variable which wont have collisions like
or
Among other things, it makes the templates readable and the scope of the settings variable clearer. |
i.e. {% set salt = .... BAD!~!!!
The text was updated successfully, but these errors were encountered: