Skip to content
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

Closed
gravyboat opened this issue Feb 16, 2014 · 4 comments
Closed
Labels
Documentation Relates to Salt documentation fixed-pls-verify fix is linked, bug author to confirm fix
Milestone

Comments

@gravyboat
Copy link
Contributor

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.

@basepi
Copy link
Contributor

basepi commented Feb 18, 2014

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.

@basepi basepi added this to the Approved for future release milestone Feb 18, 2014
@whiteinge
Copy link
Contributor

Refs #12446.

jacobhammons added a commit to jacobhammons/salt that referenced this issue Jun 14, 2016
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
@jacobhammons
Copy link
Contributor

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!

@jacobhammons jacobhammons added the fixed-pls-verify fix is linked, bug author to confirm fix label Jun 14, 2016
@gravyboat
Copy link
Contributor Author

gravyboat commented Jun 14, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Relates to Salt documentation fixed-pls-verify fix is linked, bug author to confirm fix
Projects
None yet
Development

No branches or pull requests

5 participants