Deploy
VXLAN as Code

Step 1 - Execute Ansible Playbook

Up to this point, all of the switch, Interface, VRF, and Network configurations have been pushed to ND. However, their Config Status shows as Pending since you have yet to actually deploy this configuration. In this step, you will deploy the fabric configuration from the ND controller to the devices in the fabric.

Make sure you are in your root Ansible directory


cd ~/workspace/ndlab/nac

From the root Ansible project directory execute the following command:


ansible-playbook -i hosts.stage.yml vxlan.yml -t role_deploy

Upon a successful run of the playbook your output should look as follows:

    <... SNIP ...>

    PLAY RECAP **********************************************************************************************************************************************************************
    fabric-stage               : ok=222  changed=30   unreachable=0    failed=0    skipped=691  rescued=0    ignored=0


    PLAYBOOK RECAP ******************************************************************************************************************************************************************
    Playbook run took 0 days, 0 hours, 4 minutes, 30 seconds


    TASKS RECAP *********************************************************************************************************************************************************************
    Wednesday 29 October 2025  11:49:27 +0000 (0:00:00.225)       0:04:30.699 *****
    ===============================================================================
    cisco.nac_dc_vxlan.deploy : Manage Fabric Deployment for iBGP VXLAN Fabric in Nexus Dashboard -------------------------------------------------------------------------- 191.84s
    cisco.nac_dc_vxlan.common : Display Flag Values -------------------------------------------------------------------------------------------------------------------------- 2.15s
    cisco.nac_dc_vxlan.common : Get POAP Data From POAP Enabled Devices ------------------------------------------------------------------------------------------------------ 1.85s
    cisco.nac_dc_vxlan.connectivity_check : Get Cisco Nexus Dashboard Fabric Controller Version ------------------------------------------------------------------------------ 1.57s
    cisco.nac_dc_vxlan.common : Build Fabric Creation Parameters From Template ----------------------------------------------------------------------------------------------- 0.89s
    cisco.nac_dc_vxlan.connectivity_check : Verify Authorization to Nexus Dashboard ------------------------------------------------------------------------------------------ 0.81s
    cisco.nac_dc_vxlan.validate : Copy Service Model Data to Host ------------------------------------------------------------------------------------------------------------ 0.71s
    cisco.nac_dc_vxlan.common : Build Policy List From Template -------------------------------------------------------------------------------------------------------------- 0.70s
    cisco.nac_dc_vxlan.common : Build Interface ------------------------------------------------------------------------------------------------------------------------------ 0.69s
    cisco.nac_dc_vxlan.common : Build vPC interface -------------------------------------------------------------------------------------------------------------------------- 0.68s
    cisco.nac_dc_vxlan.common : Retrieve NDFC Device Username and Password from Group Vars and update inv_config ------------------------------------------------------------- 0.68s
    cisco.nac_dc_vxlan.common : Build Interface ------------------------------------------------------------------------------------------------------------------------------ 0.67s
    cisco.nac_dc_vxlan.common : Build Fabric Switch Inventory List From Template --------------------------------------------------------------------------------------------- 0.67s
    cisco.nac_dc_vxlan.common : Retrieve NDFC Device Username and Password from Group Vars and update inv_config ------------------------------------------------------------- 0.67s
    cisco.nac_dc_vxlan.common : Build Interface ------------------------------------------------------------------------------------------------------------------------------ 0.66s
    cisco.nac_dc_vxlan.common : Build Interface ------------------------------------------------------------------------------------------------------------------------------ 0.65s
    cisco.nac_dc_vxlan.common : Build Interface ------------------------------------------------------------------------------------------------------------------------------ 0.64s
    cisco.nac_dc_vxlan.common : Build VRFs Attach List From Template --------------------------------------------------------------------------------------------------------- 0.63s
    cisco.nac_dc_vxlan.common : Build Interface ------------------------------------------------------------------------------------------------------------------------------ 0.63s
    cisco.nac_dc_vxlan.common : Build Links for vPC Peering ------------------------------------------------------------------------------------------------------------------ 0.63s

    ROLES RECAP *********************************************************************************************************************************************************************
    Wednesday 29 October 2025  11:49:27 +0000 (0:00:00.226)       0:04:30.700 *****
    ===============================================================================
    deploy ---------------------------------------------------------------- 192.71s
    common ----------------------------------------------------------------- 64.29s
    validate ---------------------------------------------------------------- 6.28s
    connectivity_check ------------------------------------------------------ 3.94s
    create ------------------------------------------------------------------ 0.25s
    common_global ----------------------------------------------------------- 0.04s
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    total ----------------------------------------------------------------- 267.51s

Note

This is the initial deploy of everything staged up to this point, thus it will take some time to complete.


Step 2 - Return to ND & Verify Deployment

Return to your ND browser window and verify the deployment of the fabric configuration.

  1. Click the Inventory tab in the top navigation bar
  2. Click the Switches tab in the sub-navigation bar
  3. Verify you see you switches in the Config Status as In-Sync. If not, please click the refresh button to the right of the Actions button


  4. Scroll to the right and verify the vPC relationship



  5. Click the Connectivity tab in the top navigation bar
  6. Click Interfaces in the sub-navigation bar
  7. There will be many interfaces, but you should now be able to confirm interface configurations to your switches



  8. Click the Segmentation and security tab in the top navigation bar
  9. Click the Networks tab in the sub-navigation bar
  10. Verify you see the Networks NaC-Net01 and NaC-Net02 now Deployed.
  11. Double-click NaC-Net01 to review the Network details



  12. Click Network Attachments
  13. Confirm NaC-Net01 is now Deployed and Attached to your switches



  14. Click VRFs
  15. Confirm NaC-VRF01 is associated to NaC-Net01 and Deployed to your switches
  16. Click the close button



  17. Click the VRFs tab in the sub-navigation bar
  18. Verify you see the VRF NaC-VRF01 now with a Deployed status
  19. Double-click NaC-VRF01 to review the VRF details



  20. Click VRF Attachments
  21. Confirm NaC-VRF01 is now Deployed and Attached to your switches



  22. Click Networks
  23. Confirm NaC-Net01 and NaC-Net02 is associated to NaC-VRF01 and Deployed to your switches
  24. Click the close button



  25. Click the Overview tab in the top navigation bar
  26. Verify your overall fabric deployment status


Congratulations!
You have automated the build of a functional VXLAN EVPN fabric in a staging environment!

In the next section, you will extend connectivity between your VXLAN EVPN fabric and an external environment.


Continue to the next section to checkout how to remove things from your VXLAN EVPN fabric.