Configuration Rendering : Configuration Templates. Documentation example #17282
-
In the docs for Configuration Rendering there is extends 'base.j2' and include 'common/interface.j2'.
I get what these do with regard to jinja templating but in the context here where / how would base.j2 and interface.j2 be defined so they can be reference in Config Templates ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
In the same folder. In the doc example, it assumes a datasource is created, datafiles are there and the tree files is kind of : |
Beta Was this translation helpful? Give feedback.
In the same folder.
Path will depend on how you consume config template --> datasource or locally created
In case of datasource (git or local option, idk for S3) --> all the datafiles are stored in the same "root" folder, could be /opt/netbox/... or the git repository itself --> just respect the relative path of your datafiles which is the same for the jinja files you write.
In the doc example, it assumes a datasource is created, datafiles are there and the tree files is kind of :
/base.j2
/common/interface.j2
/exemple.j2
The config template that is mapped to a datafile mapped itself to a datasource will "understand" automatically all the files provided into the datasource, i.e you can im…