<p>Yes, that is possible according to <a href="https://thornelabs.net/2014/05/22/include-additional-content-in-ansible-template-file.html" rel="noreferrer">this post</a>.</p>

<p>When a second jinja template was created and this was included in the base jinja it was called.</p>

<pre><code>{% include "checks/subdue.j2" %}
</code></pre>

CC BY-SA 3.0
2017-07-18T10:16:32.433Z
2017-07-18T10:16:32.433Z
030
<p>It is possible <a href="https://stackoverflow.com/q/16551717/2777965">to include a subtemplate in another Puppet template</a>.</p>

<blockquote>
  <p><code>&lt;%= scope.function_template("subtemplate.erb") %&gt;</code></p>
</blockquote>

<ansible><jinja>
Is it possible to combine jinja templates in ansible like this is possible with erbs in puppet?
030
# Is it possible to combine jinja templates in ansible like this is possible with erbs in puppet?

(Asked by: username_0 on 2017-07-18)

It is possible [to include a subtemplate in another Puppet template](https://stackoverflow.com/q/16551717/2777965).

> `<%= scope.function_template("subtemplate.erb") %>`

**Tags:** ansible, jinja


---

## 1 answers

### Answer by username_0 on 2017-07-18. Score: 7 | Accepted answer

Yes, that is possible according to this post.
When a second jinja template was created and this was included in the base jinja it was called.
{% include "checks/subdue.j2" %}


---

