1. Home
  2. Tutorials and How Tos
  3. How to Add a Configuration Management Ruleset to a Device Template

How to Add a Configuration Management Ruleset to a Device Template

Configuration management rulesets help force compliance rules onto device configurations. These rulesets are cumulative, meaning that all config rulesets from all device templates applied to a device will be added to that device.

See, How to Edit a Device Template to see how to open the device template editing page.

Once you’ve navigated to the device template editing page, in the “Configuration Management Ruleset” section of the “Template Components” panel, click the add ruleset button.

Click the plus button to add a new configuration management ruleset to the device template.

On the page that follows:

The configuration management ruleset dialog.
  1. In the TITLE field, enter a name for your ruleset. All configuration ruleset names must be unique.
  2. In the CONTEXT field, enter the section of the device configuration that will be evaluated by the ruleset (regular expression). Leave blank to match the top level context (i.e. no context).
  3. In the RULE(S) section, add conditions that represent the desired state of the device config (regex allowed). Click the add button on the right to add additional conditions.
    • “Must Have” means that if the device config does not contain the value to the right of the condition, execute the ACTION.
      • In the example above, if any device configs affected by this template do not contain the value “keepalive 10” under the specified context “interface GigabitEthernet1\/0\/2”, the action—which adds that value to that context—will be executed on that device config.
    • “Must Not Have” means that if the device config does contain the value to the right of the condition, execute the ACTION.
  4. In the ACTION field, enter the set of commands that you want executed on the device configuration.
    • Connect and disconnect commands are not required in the commandlet. OmniCenter will handle these on its own.
    • Begin the commandlet with a command to enter configuration mode for the device. End the commandlet with a command to exit configuration mode. For each deeper level of context you go (for example, accessing a specific interface) a matching exit command must also be included.
    • When specifying the context in the commandlet, enter $CONTEXT$. OmniCenter will replace this with the value entered in the CONTEXT field (see example in image above).
    • No error checking is done on the configuration commands used. Therefore it is imperative that you double-check the commands you enter to avoid doing something destructive.
  5. When finished click the Add Rule button.

You may add as many config management rulesets as necessary. When finished, it is not necessary to click the Update button on the main edit page. This is only required when editing authentication credentials.

If you’ve added config management rulesets to a device template that is already applied to any devices, navigate back to the Device Templates Administration page using the arrow icon at the top left of the page and reapply your device templates.

Updated on January 22, 2019

Was this article helpful?

Need Support?
Can’t find the answer you’re looking for? Don’t worry we’re here to help!
Contact Support

Leave a Reply