Managing configuration change using templates
The following example procedures, which are specific to an environment consisting of Cisco IOS routers contain steps that can be performed to manage configuration change using templates in a quick start stand-alone BMC Network Automation configuration:
Creating a change template
The following example procedure demonstrates how to create a change template. You can also create a template by using an existing configuration for a device as a template, as described in Adding a template.
- Open the Templates page by navigating to Network > Scripts > Templates in the UI.
- Open the Add Template page by clicking Add in the menu.
- In the Name field, enter Standard Cisco IOS Banner.
- Click the Contents tab.
- Click Add to add template contents.
- In the Device Type field, enter Cisco and Cisco IOS Switch/Router.
- In the Contents field enter the following:
banner motd “No Trespassing. All use of this network device must be authorized by the owning organization. This device is being monitored.”
You can create multiple entries in the Contents field, each assigned a unique device type and OS version. This enables you to define one template that supports a multi-vendor change. When you use the template in a Deploy to Active job, the system selects the Content entry appropriate to the target device’s device type and OS version.
- Click Save.
Deploying a change using a template
Te following example procedure demonstrates how to deploy a configuration change using a template.
- Open the Add Job page.
- Open the Deploy to Action pop-up.
- In the Annotation field, enter Banner Change.
- In the Network Span field, select Device.
- Click and select your device from the listing in the pop-up.
- In the Configuration field, select Template.
- Click and select Standard Cisco IOS Banner from the pop-up.
- Click OK.
- In the Actions tab in the Add Job page, note that by clicking on Report, you can view a Configuration Comparison Report comparing the current configuration with the template.
- In the Details tab in the Add Job page, enter the following:
- In the Run At field, select the Now or When Approved option.
- Click Save and Submit.
Verifying the change took place
The following example procedure demonstrates how to verify that the change took place.
After the Deploy to Active action is completed, the status of the action in the Jobs page (Network > Actions > Jobs) should be Completed.
Completed jobs remain in the listing on the Jobs page for 7 to 120 days, depending on how you have set the Purge Completed Jobs After system parameter.
Open the Job Details report by clickingDetails in the Actions column for the recently executed job.
The Job Details report displays the workflow summary along with a link to the Job Summary Report, link to the Transcript Details, and a link to the Deploy to Active script (as applicable) for each device involved in the action.
Open the Job Summary Report by clicking on the Job Summary link and note that the workflow parameters and schedule are displayed along with the actual changes made to the devices involved.
You can also view these changes in the Dashboard by clicking Discrepancy in the Running vs Trusted Running column for the device.
If the change took place on a group of devices, the Job Summary Report includes the comparison for each device of the before and after configuration. Templates allow you to organize common change requests for devices with different device types and OS versions. For example, a template called Banners could contain three (3) content entries for assigning the banner for three (3) different vendors: one for Cisco IOS; one for Cisco PixOS; and lastly one for NetScreen. On the Deploy to Active span action, you select the Banners template and the network span. BMC Network Automation will use the content entry that matches the device’s type and OS version and will skip entries for other devices.
Accepting the configuration change
The following example procedure demonstrates how to accept the configuration change.
- Open the Dashboard by clicking the Home tab.
- Click the Cisco Router device name.
A pop-up containing information about the device and links to various actions and reports is displayed.
- In the pop-up, click Commit in the Actions section.
- In the Commit window, make the following changes:
- In the Annotation field, enter Standard banner change accepted.
- Select the Mark As Trusted option.
If you select the Group or Combo Group view of the Dashboard, and click the name of the group, you can act on all devices in the group with a single operation. Selecting Commit with the Mark As Trusted option selected, for instance, will accept the new configuration as trusted for every device in the group.
- In the Run At field of the Add Job window, select the Now or When Approved option.
- Click Save and Submit.
- Since the new banner change has been made Trusted and committed to the Startup configuration, there is no longer a discrepancy in the dashboard for the Cisco Router.
- When you initially deployed the change using the template, you could have selected options to Commit and Mark as Trusted