Template Basics
Introduction to configuration templates in NetStacks.
Overview
Templates allow you to define device configurations as reusable, parameterized code. Using Jinja2 templating, you can create configurations that adapt to different devices and environments.
- Define once, deploy everywhere
- Variables for device-specific values
- Version control for all changes
- Preview before deployment
Creating Templates
- Navigate to Templates → New Template
- Enter template name and description
- Select target device type(s)
- Write template content using Jinja2 syntax
- Define variables
- Click Save
Template Structure
snmp-config.j2jinja2
{# Template: SNMP Configuration #}
{# Variables: snmp_community, snmp_location, snmp_contact #}
snmp-server community {{ snmp_community }} RO
snmp-server location {{ snmp_location }}
snmp-server contact {{ snmp_contact }}
snmp-server enable trapsTip
Use comments to document template purpose and required variables.