Fortinet white logo
Fortinet white logo
7.6.0

Introduction

Introduction

What is Jinja?

Jinja is a fast and extensible templating engine. It utilizes special placeholders, or variables, in templates with a Python-like syntax. Once data is passed to the template, the variables are replaced with values and a final template is rendered.

How FortiManager supports Jinja

Beginning in version 7.0.1, FortiManager's CLI templates include support for Jinja 2.11 and Ansible's ipaddr filter module. When creating CLI templates, you can use Jinja and ipaddr filters with metadata variables to create scalable, dynamic templates which can be applied to managed devices.

Various Jinja utilities are supported within FortiManager CLI templates including built-in filters and tests.

For information on how to configure FortiManager CLI templates using Jinja, see the FortiManager Admin Guide.

For an example of how Jinja can be used to configure SD-WAN branch devices in FortiManager, see Branch configuration using FortiManager Jinja2 CLI templates.

Notations used in this document

In this document, the following notations are used:

  • Text: indicates a script component.

  • # Text: indicates a comment within the script.

  • >> Text: indicates the execution result of the script.

Introduction

Introduction

What is Jinja?

Jinja is a fast and extensible templating engine. It utilizes special placeholders, or variables, in templates with a Python-like syntax. Once data is passed to the template, the variables are replaced with values and a final template is rendered.

How FortiManager supports Jinja

Beginning in version 7.0.1, FortiManager's CLI templates include support for Jinja 2.11 and Ansible's ipaddr filter module. When creating CLI templates, you can use Jinja and ipaddr filters with metadata variables to create scalable, dynamic templates which can be applied to managed devices.

Various Jinja utilities are supported within FortiManager CLI templates including built-in filters and tests.

For information on how to configure FortiManager CLI templates using Jinja, see the FortiManager Admin Guide.

For an example of how Jinja can be used to configure SD-WAN branch devices in FortiManager, see Branch configuration using FortiManager Jinja2 CLI templates.

Notations used in this document

In this document, the following notations are used:

  • Text: indicates a script component.

  • # Text: indicates a comment within the script.

  • >> Text: indicates the execution result of the script.