Network Template Usage
Dashboard Location: N/A (Template assignment is configured in the NAC data model, not in the Meraki Dashboard)
Applying Templates and Supplying Variables to Networks
Section titled “Applying Templates and Supplying Variables to Networks”Once templates are defined under meraki.templates.networks, each network can reference one or more of them by name using the templates field. The templates field is an ordered list — templates are merged into the network configuration in the order they are listed. If two templates define the same key, the last one wins.
The variables block supplies the values that replace ${variable_name} placeholders across all referenced templates. Every placeholder used in any of the referenced templates must have a corresponding entry in variables, or an empty string is substituted. Variables that reference secrets should use !env variable_name instead of inline values.
This separation — templates define the structure, variables supply the values — means that adding a new site is as simple as adding a new network entry with its own variables. The shared configuration in the templates is updated once and automatically propagates to every network that references it on the next deployment.
Diagram
Section titled “Diagram”Classes
Section titled “Classes”networks (meraki.domains.organizations)
Section titled “networks (meraki.domains.organizations)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| templates | List | String | No | |
| variables | Map | No |
Examples
Section titled “Examples”Example 1: Two Networks Using the Same Templates with Different Variables
Section titled “Example 1: Two Networks Using the Same Templates with Different Variables”This example shows two networks with different template selections. Rome-Network-1 references three templates (nw_setup_mgmt, wireless, and fw_rules_template) and supplies a custom firewall rule list via the template_network_1_fw_rules variable used by the file template. Lisbon-Network-1 references only the two model templates (nw_setup_mgmt and wireless) — it does not apply the firewall file template and therefore does not need the template_network_1_fw_rules variable. Both networks share the same SSID names, RADIUS servers, and syslog settings; only per-site values like time zone differ.
meraki: domains: - name: EU administrator: name: admin organizations: - name: Acme networks: - name: Rome-Network-1 templates: - nw_setup_mgmt - wireless - fw_rules_template variables: syslog_server: 3.4.5.6 syslog_port: 514 snmp_username: snmpuser local_page_username: localuser data_wireless_ssid_name: Data data_ssid_schedules_enabled: true guest_wireless_ssid_name: Guest guest_wireless_client_bw_down: 0 guest_wireless_client_bw_up: 0 guest_wireless_ssid_bw_down: 0 guest_wireless_ssid_bw_up: 0 guest_ssid_schedules_enabled: true guest_ssid_welcome_message: Unauthorized access is prohibited. radius_accounting_server1_host: 172.16.1.1 radius_accounting_server2_host: 172.16.1.2 radius_server1_host: 172.16.1.1 radius_server2_host: 172.16.1.2 time_zone: Europe/Rome network_notes: This is a small branch network created via Netascode. template_network_1_fw_rules: - protocol: tcp destination_port: 80 policy: deny - protocol: tcp destination_port: 443 - protocol: tcp destination_port: 22 - destination_port: 3389 - protocol: tcp destination_port: 8080 - protocol: tcp destination_port: 8443 - protocol: udp destination_port: 53 - protocol: udp destination_port: 123 - name: Lisbon-Network-1 templates: - nw_setup_mgmt - wireless variables: syslog_server: 3.4.5.6 syslog_port: 514 snmp_username: snmpuser local_page_username: localuser data_wireless_ssid_name: Data data_ssid_schedules_enabled: true guest_wireless_ssid_name: Guest guest_wireless_client_bw_down: 0 guest_wireless_client_bw_up: 0 guest_wireless_ssid_bw_down: 0 guest_wireless_ssid_bw_up: 0 guest_ssid_schedules_enabled: true guest_ssid_welcome_message: Unauthorized access is prohibited. radius_accounting_server1_host: 172.16.1.1 radius_accounting_server2_host: 172.16.1.2 radius_server1_host: 172.16.1.1 radius_server2_host: 172.16.1.2 time_zone: Europe/Lisbon network_notes: This is a small branch network created via Netascode.Example 2: Selective Template Application
Section titled “Example 2: Selective Template Application”Not every network needs every template. A site without wireless equipment would simply omit the wireless template from its list. A network that needs firewall rules but not SNMP configuration can reference only the relevant templates. The variables block only needs to supply values for placeholders that appear in the templates actually referenced.
meraki: domains: - name: EU administrator: name: admin organizations: - name: Acme networks: - name: Wired-Only-Branch templates: - nw_setup_mgmt variables: syslog_server: 10.0.0.5 syslog_port: 514 snmp_username: snmpro local_page_username: admin time_zone: America/New_York network_notes: Wired-only branch — no wireless hardware.