-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Create documentation that talks about using Jinja specifically for Salt. #10480
Comments
This would be great. We should also very prominently link to documentation for writing custom states/modules, because some of the stuff I see people try to do with jinja syntax is crazy. Often writing a custom state/module is the write answer. |
Refs #12446. |
Removes the "Full list of builtin ..." from each module reference list, leaving just the module type for scanability. Refs saltstack#12470 Refs saltstack#10206 Refs saltstack#10480 Refs saltstack#23522 Refs saltstack#33023
I think most of this content was gathered and placed in the Jinja renderer doc, I've moved it to a more prominent doc titled Understanding Jinja under the Using Salt heading, https://docs.saltstack.com/en/latest/topics/jinja/index.html#including-context-during-include-import I've also added a section on writing custom modules to deal with Jinja complexities. @gravyboat If you think this issue is resolved please close, thanks! |
This looks really good. I think there could definitely be more related to common Salt implementations (such as imports from defaults.yaml, map files, the pillar, etc.), as well as more 'advanced' topics like defaults, advanced loops, and so forth. A lot of this could probably be stolen from the existing formulas, but this is the sort of content most people end up asking about. Showing people how to reference and loop through pillars is especially common and something we see in the IRC a lot. If you have time hanging out in the IRC or reviewing the logs and doing a search for 'jinja' should provide some really good insights into what people commonly ask. The Jinja docs cover a good amount of basic stuff, but they don't talk about anything advanced that you would do uniquely for Salt. |
We've got a lot of great Jinja examples through the documentation, as well as on gists. A centralized place with a bunch of examples showing how to use Jinja with Salt, the fact you can use Python with it, etc. would be great.
The text was updated successfully, but these errors were encountered: