--- title: "Dynamic Configuration via Templating" slug: "dynamic-configuration-via-templating" description: "Automate router-specific configurations in icom Router Management using config change templates and custom fields—ideal for scalable, location-based rollouts." tags: ["icom Router Management"] updated: 2025-09-02T14:53:11Z published: 2025-09-16T07:00:05Z canonical: "docs.insys-icom.com/dynamic-configuration-via-templating" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.insys-icom.com/llms.txt > Use this file to discover all available pages before exploring further. # Dynamic Configuration via Templating **icom Router Management (iRM)** supports the creation of **reusable configuration templates** that are dynamically rendered for each router. This feature allows administrators to centrally manage configurations while adapting key values for individual devices. > [!NOTE] > **Note:** Using configuration templates requires an active **iRM Cloud Basic**, **iRM Server**, or **iRM Data Center** license. **The Core Concept** Templates contain **placeholders** that are replaced with **device-specific values** at deployment time, using iRM's **Custom Fields** and **parameters**. This approach reduces manual effort, prevents configuration errors, and ensures consistent structure across distributed router fleets — even when per-device customization is needed. --- ## Use Case: Site-Specific NTP and DNS Configuration ### Goal An organization manages ~50 routers across various industrial sites. Each router must be configured with: - A **unique hostname** - A **custom domain suffix** (for internal DNS resolution) - A **local NTP server IP** (for time synchronization with local systems) These values vary per site but follow a standard structure. Instead of maintaining 50 separate configurations, the administrator wants to **use a single template**, populated dynamically with values from each router’s profile. ### Template Example Below is a sample ASCII-style configuration template using iRM’s custom field placeholders: ```ini administration.hostnames.hostname={{ .hostname }} administration.hostnames.domainname={{ .domainname }} administration.time.ntp_peer={{ .ntp_ip }} ``` > [!TIP] > How it works > > Each placeholder (e.g. {{ .hostname }}) will be replaced by iRM at deployment time with the value stored in the router's Custom Fields. --- ## Step-by-Step: How to Use Templates with Custom Fields ### 1. Define Custom Fields Create the following custom fields in iRM (if not already defined): | Field Name | Description | Example Value | | --- | --- | --- | | `hostname` | Desired router hostname | `mrx-berlin-001` | | `domainname` | Desired domain name | `berlin.insys.local` | | `ntp_ip` | IP of local NTP server | `192.168.100.10` | To define or edit custom fields for a router: - Navigate to the router’s detail view - Open the **Custom Fields** section - Enter the appropriate values --- ### 2. Create the Configuration Template 1. Go to **Inventory → Templates.** 2. Click **Add.** 3. Name the template (e.g., `Site-Specific NTP and DNS`). 4. Click **Add** to create the template. ![](https://cdn.document360.io/c690fe99-a3eb-474c-a449-c2c75e5df119/Images/Documentation/Create Template 1.png) 5. Paste the template content (see example above) and remove the placeholders (e.g. `{{ .hostname }}`). ![](https://cdn.document360.io/c690fe99-a3eb-474c-a449-c2c75e5df119/Images/Documentation/Create Template 2.png) 6. Rename the default parameter to your desired name, e.g. `hostname` 7. Use the **Type** drop-down and choose **Custom field: hostname** ![](https://cdn.document360.io/c690fe99-a3eb-474c-a449-c2c75e5df119/Images/Documentation/Create Template 3.png) 8. Next, place your cursor after the equal sign in line 1 and click on the ![application braces plus outline](https://docs.insys-icom.de/assets/icons/application-braces-plus-outline.png) **Copy parameter into template** button. This will paste the parameter in the right format at the cursor position. **![](https://cdn.document360.io/c690fe99-a3eb-474c-a449-c2c75e5df119/Images/Documentation/Create Template 4.png)** 9. Add the next parameter by clicking on **Add new parameter.** 10. Repeat steps 7 - 9 until you have all parameters added to the corresponding line of configuration. ![](https://cdn.document360.io/c690fe99-a3eb-474c-a449-c2c75e5df119/Images/Documentation/Create Template 5.png) 11. Save the template by clicking on **Save**. --- ### 3. Create an Update Job To deploy the rendered template: 1. Use the **Select action** menu and choose **Apply to router**. ![](https://cdn.document360.io/c690fe99-a3eb-474c-a449-c2c75e5df119/Images/Documentation/Create Template 6.png) 2. Choose the target router(s) or group(s) and click on **Continue**. ![](https://cdn.document360.io/c690fe99-a3eb-474c-a449-c2c75e5df119/Images/Documentation/Create Template 7.png) 3. Review the job details. ![](https://cdn.document360.io/c690fe99-a3eb-474c-a449-c2c75e5df119/Images/Documentation/Create Template 8.png) 4. You can trigger the rollout of the template immediately by selecting **Run immediately**, or schedule it for manual execution at a later time by selecting **Start manually later**. The resulting Update Job can be viewed in **Update Management → Update Jobs**. ![](https://cdn.document360.io/c690fe99-a3eb-474c-a449-c2c75e5df119/Images/Documentation/Create Template 9.png) > [!WARNING] > Attention > > - If a required custom field is missing on a router, the job will **fail for that device** — check the logs to identify and fix issues. > - Templates support more complex configurations (ACLs, firewall rules, routes, etc.) using the same pattern. For more advanced use cases or help setting up your templates, please contact our support team.