NetStacksNetStacks

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

  1. Navigate to Templates → New Template
  2. Enter template name and description
  3. Select target device type(s)
  4. Write template content using Jinja2 syntax
  5. Define variables
  6. 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 traps
Tip

Use comments to document template purpose and required variables.