Chapter 5 Repository Structure

For diagrams, tables, or exact code formatting, .

JOHN W. CAPOBIANCOPRINTED PAGE 88
---- show_cdp_neighbors.yml 
            ---- wan_documentation.yml 
      ---- management 
           | 
            ---- assembled_configure_wan.yml  
            ---- configure_wan.yml 
---- DMZ 
     | 
      ---- tactical 
           | 
            ---- acl_deployment.yml 
      ---- recon 
          | 
           ---- show_cdp_neighbors.yml 
           ---- dmz_documentation.yml 
     ---- management 
          | 
           ---- assembled_configure_dmz.yml  
           ---- configure_dmz.yml

Tasks

Tasks is another folder required in the Ansible framework. The tasks folder holds all the YAML task files that call Ansible modules. A similar folder structure to the other folders should be created for scalability and to keep tasks sorted by environment and function. The tasks in the configuration's subfolders match one-to-one with each of the Jinja2 template files created. This is not meant to exhaustively cover all the files created but rather to give a picture of the folder structure and samples of the types of tasks required and where to store them:

tasks 
| 
 ---- adhoc 
      | 
       ---- ios  
            | 
             ---- copyrunstart.yml 
             ---- copyruntftp.yml 
       ---- nxos 
            | 
             ---- copyrunstart.yml 
             ---- copyruntftp.yml 
       ---- big_ip  
 ---- audit 
      | 
       ---- ios 
            | 
             ---- ios_gather_facts.yml 
             ---- show_ospf_neighbor.yml 
             ---- show_ip_route.yml 
             ---- show_vrf_details.yml 
       ---- nxos 
            | 
             ---- show_ospf_neighbor.yml 
       ---- big_ip 
 ---- configurations