-
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
Salt interpets jinja syntax in contents pillar #33319
Comments
@grobinson-blockchain Another approach you could take if you do not like specifying |
@Ch3LL thanks for replying! Is this referenced in the docs at all? If not, I think that would be very useful as I can't be the only person trying to use pillars int this way! |
@grobinson-blockchain hmmm i actually can't find an instance of us documenting {% raw %}. Although it is on jinjas documentation here I think its a great idea to get this added to our jinja docs though! |
@Ch3LL that would be great!
I think the issue for most people would be making the connection that they can use Jinja |
I've added some docs about this in #33513. |
@grobinson-blockchain are you okay closing this issue? |
@Ch3LL yep! |
I have a situation where I want to use
contents_pillar
within thefile.managed
module to create consul-template templates.However, consul-template shares a subset of its syntax with Jinja. This means that
contents_pillar
does not escape the contents of the pillar on output and any occurrences of{{
}}
are interpreted as Jinja syntax:However it appears that this can be avoided with raw blocks in Jinja:
That said this feels like kind of a hack. Would it be possible to pass an option to
file.managed
that wraps the content (orcontent_pillar
) in a raw block?The text was updated successfully, but these errors were encountered: