Chapter 7 Tactical Playbooks

For diagrams, tables, or exact code formatting, .

JOHN W. CAPOBIANCOPRINTED PAGE 121
prompt: please enter output filename 
     private: no   
  tasks: 
  - import_tasks: ospfneighbors.yml 
 
- hosts: DIST01 
  tasks: 
  - name: configure DIST01 
    ios_config: 
      lines: 
        -  ip ospf network point-to-point 
      parents: interface Port-channel1 
      provider: "{{ ioscli }}" 
      
- hosts: CORE 
  tasks: 
  - name: configure CORE-Po1 
    ios_config: 
      lines: 
        -  ip ospf network point-to-point 
      parents: interface Port-channel1 
      provider: "{{ ioscli }}" 
  
- hosts: DIST02 
  tasks: 
  - name: configure DIST02 
    ios_config: 
      lines: 
        -  ip ospf network point-to-point 
      parents: interface Port-channel1 
      provider: "{{ ioscli }}" 
  
- hosts: CORE 
  tasks: 
  - name: configure CORE-Po2 
    ios_config: 
      lines: 
        -  ip ospf network point-to-point 
      parents: interface Port-channel2 
      provider: "{{ ioscli }}" 
  
- hosts: CAMPUS 
  serial: 1 
  
  vars_prompt: 
   - name: output_file 
     prompt: please enter output filename 
     private: no 
   
  tasks: 
  - import_tasks: ospfneighbors.yml

Execute the playbook in check mode with verbosity as a dry run. Once satisfied with the results execute the change in execute mode, being aware of the outage it will cause, observing the changes.