Including Jinja2 templates in other templates #13602
Unanswered
fatman00
asked this question in
Help Wanted!
Replies: 1 comment 2 replies
-
|
Including templates like that only works when both files are in the same data source. It does not work at all for manually created config templates. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I am trying to use the new Templates system in Netbox v3.5.6 and would like to have a base template with some macros for the common configuration I have on all my devices(aaa, ntp, dns, line config).
But I am not able to get the my device template to include the base config.
I have created a Config template called Switch Config that I attache to all my switches but in that I use {% include 'BaseConfig' %} at the top according to: #11559 (comment)
I have a Config Template called BaseConfig as well that includes the configuration I want to include, but when I try to use it the interpreter just gives me an error as shown below:
Is there any way I can include some of the other templates I have?
Beta Was this translation helpful? Give feedback.
All reactions