Configure a Template or Template Stack Variable
How to create a variable in a template or template stack and push it to firewalls and appliances.
To enable you to more easily reuse templates or template stacks, you can use template and template stack variables to replace IP addresses, Group IDs, and interfaces in your configurations. Template variables are defined at either the template or template stack level and you can use variables to replace IP addresses, IP ranges, FQDN, interfaces in IKE, VPN and HA configurations, and group IDs. Variables defined in the template override variables defined in the template stack because template configurations have higher priority than template stack configurations. Variables allow you to reduce the total number of templates and template stacks you need to manage, while allowing you to keep any firewall- or appliance-specific values. For example, if you have a template stack with a base configuration, you can use variables to create values that do not apply to all firewalls in the template or template stack. This allows you to manage and push configurations from fewer templates and template stacks while accounting for any firewall- or appliance specific values that you would otherwise need before you can create a new template or template stack.
To create a template or template stack variable:
- SelectandPanoramaTemplatesManage(Variables column) the template or template stack for which you want to create a variable.
- Addthe new variable.A variable name must start with the dollar ( $ ) symbol.
Variables can also be created inline where variables are supported.
- Name the new variable. In this example, the variables are named$DNS-primaryand$DNS-secondary.
- Select theVariable typeand chooseIP Netmask,IP Range,FQDN,Group ID, orInterface. For this example, address.
- Enter the corresponding value forType.
- From theTemplatedrop-down, select the template or template stack to which the variable belongs.
- Enter the variable in the appropriate location.For this example, reference the previously defined DNS value.
- Selectand edit Services.DeviceSetupServices
- Type$DNS-primaryor select it from the drop-down forPrimary DNS Server.
- Type$DNS-secondaryor select it from the drop-down forSecondary DNS Server.
- ClickCommitandCommit and Pushyour changes to managed firewalls.When you push a device group configuration with references to template or template stack variables, you mustEdit SelectionsandInclude Device and Network Templates.
- Verify that the values for all variables were pushed to the managed devices.
- From theContextdrop-down, select a firewall that belongs to the template stack for which the variable was created.
- Settings with values defined by a template or template stack are indicated by a template symbol ( ). Hover over the indicator to view to which template or template stack the variable definition belongs. When viewing from the firewall context, the variables display as the IP address you configured for the variable.
Panorama > Templates > Template Variables
Describes how to add a variable definition for a template or a template stack. ...
Configuration Reusability For Templates and Template Stacks
Enhanced template and template stack reusability using variables to reduce total template count while maintaining any unique configurations. ...
Import and Overwrite Existing Template Stack Variables
Import template or template stack variables to easily reuse template or template stacks. ...
Templates and Template Stacks
Overview of template and template stack configuration functionality. ...
Manage Templates and Template Stacks
Manage Templates and Template Stacks Use templates and template stacks to define the common base configurations that enable firewalls to operate in your network. See ...
Override a Template Stack Setting Using Variables
How to use variables to override a configuration setting pushed to the firewall from a template or template stack. ...
Override a Template Setting
Override a template setting on the firewall by manually overriding the values on the firewall or by using variables. ...
Override a Template Setting Using Template Stack Variables
How to use a template stack to override a configuration setting pushed to the firewall from a template. ...