Using user-defined variables in CLI-based group configuration

You can create custom variables of text, numbers, or IP addresses types to customize group configurations easily. These variables act as placeholders in IOS/IOS-XE CLI and allows you to set specific settings for each device. You can directly define these pre-defined user-defined variables within the CLI commands or in the Form View for more complex setups. For details on creating these variables, see User-defined variables.

Additionally, you can search for devices based on these custom variable values in your Inventory.

Standard Group - Device level configuration

  1. Go to Configuration > Groups.

  2. Select a group listed by its name (or use Search) for which you want to add the user-defined variable.

  3. Click Edit Group.

  4. In the Edit Group window, choose Configurations.

  5. Select Extended Form. You can use your user-defined variable in this form. Extended Form allows you to modify the existing settings and add new parameters using CLI to customize the configuration settings as required by your organization. The Extended Form allows you to use Cisco-defined variables and User-defined variables to configure the parameters in the settings. For details on how to use the variables, see Edit Configuration. To view a list of Cisco-defined variables available in the eCVD, see Configuration Variables.

  6. Click Save.

  7. To add or verify the user-defined variable, go to Inventory and select the device.

    1. To add the user-defined variable value: Click Device Configuration-> Edit Config-> Additional Settings. Click Save to retain the variable for later configuration push or select Save & Push to immediately add it to the configuration.

    2. To view the current user-defined variable value: Go to Device Specific Variables table, scroll to the Additional Settings. The user-defined variable that you added, will be displayed.

    Viewing User-defined Variable Usage Standard group - device level config

Limitations:

You can only configure the variable at the device level, not at the group level.

Legacy Group - Group level configuration

  1. Go to Configuration > Groups.

  2. Select a group listed by its name (or use Search) for which you want to add the user-defined variable.

  3. Click Edit Group.

  4. In the Edit Group window, choose Configurations.

  5. Turn Off the Form View toggle button in the top right of this window.

  6. In the Bootstrap Configuration, Configuration, or embedded AP Configuration (applicable for IR800 only), specify the user-defined variable as required.

  7. Click Save. This will trigger a pop-up to confirm if you would like to see the CLI changes in the Form View fields. Click Proceed.

  8. To verify, turn on the Form View.

  9. In the Additional Settings section, click the drop-down to view and find the user-defined variable that you added.

You can view the variable usage from both device level configuration and group level configuration.

Viewing User-defined Variable Usage Legacy group - device level config

Legacy Group - Device level configuration

  1. To verify or update the user-defined variable, go to Inventory and select the device.

  2. To add the user-defined variable value: Click Device Configuration-> Edit Config-> Additional Settings. Click Save to retain the variable for later configuration push or select Save & Push to immediately add it to the configuration.

  3. To view the current user-defined variable value: Go to Device Specific Variables table, scroll to the Additional Settings. The user-defined variable that you added, will be displayed.

Viewing User-defined Variable Usage Legacy group - group level config

Limitations:

  • You cannot view variable usage in the bootstrap configuration.
  • While tracking variable usage within configuration groups, if a variable is incorporated into different configurations within the same group, it will only be counted once.

Note: For more details on Standard and Legacy Groups, see Edit Configuration