Chapter 10 Configuration Management

For diagrams, tables, or exact code formatting, .

JOHN W. CAPOBIANCOPRINTED PAGE 177
TASK [Create IOS SVI configuration] ************************************************** 
ok: [DIST01] => {"changed": false} 
 
TASK [Create IOS Platform Port-Channel Interface configuration] ********************** 
ok: [DIST01] => {"changed": false} 
 
TASK [Create IOS Host Port-Channel Interface configuration] ************************** 
ok: [DIST01] => {"changed": false} 
 
TASK [Create IOS Host Interface - Unused Ports - configuration] ********************** 
ok: [DIST01] => {"changed": false} 
 
TASK [Create IOS Host Interface - OPZone - configuration] **************************** 
ok: [DIST01] => {"changed": false} 
 
TASK [Create IOS Host Interface – SECURITY - configuration] ************************** 
ok: [DIST01] => {"changed": false} 
 
TASK [Create IOS Host Interface - WAP - configuration] ******************************* 
ok: [DIST01] => {"changed": false} 
 
TASK [Create IOS Host Interface - Custom Ports - configuration] ********************** 
ok: [DIST01] => {"changed": false} 
 
PLAY [CAMPUS-DIST] ******************************************************************* 
 
TASK [Create IOS DHCP Servers] ******************************************************* 
ok: [DIST01] => {"changed": false} 
 
PLAY [CAMPUS-ACCESS] ***************************************************************** 
 
PLAY [CAMPUS-CORE] ******************************************************************* 
 
PLAY [CAMPUS] ************************************************************************ 
 
TASK [Copy Run Start] **************************************************************** 
ok: [DIST01] => {"changed": false} 
 
PLAY RECAP *********************************************************************** 
DIST01                    : ok=29   changed=1    unreachable=0    failed=0 
 
Campus Configuration – Assembled

The complete configuration management of a device, using the same templates, but utilizing a different playbook task (assemble) to compile a single task, can be accomplished. The advantage is that only a single configuration change is made per-device optimizing the execution time. There are a few drawbacks, primarily the loss of control over the scope of the tasks, as well as losing visibility into the playbook at execution time. First review the playbook:

--- 
 
- hosts: CAMPUS 
  tasks: 
    - name: create IOS combined template  
      assemble: