Chapter 10 Configuration Management
For diagrams, tables, or exact code formatting, .
Campus Configuration Now that the compiled output is available to use for validation, safely move forward using the data models and dynamic templates to take full control of the network configurations. At this point they are changes that will be made in the first run of this playbook. Changes may have been performed manually to ensure parity between intent-based configurations and live running-configurations.
Either way the next playbook should be executed with caution. Use verbose check mode and limit the device scope at first to ensure there is awareness of the configuration changes the playbook will make.
First, a playbook that serially executes tasks in order device-by-device is shown. The first task is to gather facts followed by the modular configuration tasks to be performed on each device. It is important to understand these tasks run on each device in sequence as opposed to running to completion on a device, then configuring the next device. Finally, we perform a copy running-configuration startup- configuration command committing all changes to the device. The advantages and disadvantages to this approach are discussed after examining the playbook in action.
Campus Configuration – Serial
---
- hosts: CAMPUS
tasks:
- import_tasks: ../../tasks/configurations/ios/configure_ios_global.yml
- import_tasks: ../../tasks/configurations/ios/configure_ios_management_source.yml
- import_tasks: ../../tasks/configurations/ios/configure_ios_archive.yml
- import_tasks: ../../tasks/configurations/ios/configure_ios_default_gateway.yml
- import_tasks: ../../tasks/configurations/ios/configure_ios_snmp.yml
- import_tasks: ../../tasks/configurations/ios/configure_ios_acls.yml
- import_tasks: ../../tasks/configurations/ios/configure_ios_mcq_qos.yml
- import_tasks: ../../tasks/configurations/ios/configure_ios_aaa_rsa.yml
- hosts: CAMPUS-CORE-DIST
tasks:
- import_tasks: ../../tasks/configurations/ios/configure_ios_vsl.yml
- import_tasks: ../../tasks/configurations/ios/configure_ios_vrf.yml
- import_tasks: ../../tasks/configurations/ios/configure_ios_vrf_list.yml
- import_tasks: ../../tasks/configurations/ios/configure_ios_ospf.yml
- import_tasks: ../../tasks/configurations/ios/configure_ios_multicast.yml
- import_tasks:
../../tasks/configurations/ios/configure_ios_platform_interfaces_DAD.yml
- hosts: CAMPUS
tasks:
- import_tasks: ../../tasks/configurations/ios/configure_ios_vlan.yml
- import_tasks: ../../tasks/configurations/ios/configure_ios_vlan_interface.yml
- import_tasks:
../../tasks/configurations/ios/configure_ios_platform_port_channel_interface.yml
- import_tasks:
../../tasks/configurations/ios/configure_ios_host_port_channel_interface.yml
- import_tasks:
../../tasks/configurations/ios/configure_ios_host_interfaces_unused.yml