# templating templates??

**URL:** <https://forum.ansible.com/t/templating-templates/17787>\
**Category:** Ansible Project\
**Created:** [March 19, 2015, 10:52am UTC](https://forum.ansible.com/t/templating-templates/17787 "2015-03-19T10:52:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dick\_Davies](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@Dick\_Davies](https://forum.ansible.com/u/Dick_Davies)\
**Post date:** [March 19, 2015, 10:52am UTC](https://forum.ansible.com/t/templating-templates/17787/1 "2015-03-19T10:52:07Z")

</div>

Morning

I need to push out a Go template file that needs some environment  
specific settings, so tried to template the template  
(yes, a bit 'yo dawg' i know).

Of course this blows up as both jinja2 and go templating use double  
mustaches '{{ foo }}' .

Has anyone got a workaround for this?

Maybe changing the jinja2 delimiters just for this one file?

---

<div class="post-metadata">

**Author:** ![Dick\_Davies](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@Dick\_Davies](https://forum.ansible.com/u/Dick_Davies)\
**Post date:** [March 19, 2015, 11:09am UTC](https://forum.ansible.com/t/templating-templates/17787/2 "2015-03-19T11:09:39Z")

</div>

Never mind, just found {% raw %} ..... {% endraw %}

---

<div class="post-metadata">

**Author:** ![Jon\_Soul](https://avatars.discourse-cdn.com/v4/letter/j/ecc23a/32.png) [@Jon\_Soul](https://forum.ansible.com/u/Jon_Soul)\
**Post date:** [March 19, 2015, 11:10am UTC](https://forum.ansible.com/t/templating-templates/17787/3 "2015-03-19T11:10:08Z")

</div>

Is this what you’re looking for: [http://jinja.pocoo.org/docs/dev/templates/#escaping](http://jinja.pocoo.org/docs/dev/templates/#escaping)?

Either use {% raw % } or {{ ‘{{’ }} depending on your use case.
