Roles
Ansible

Step 1 - Add NDFC VRF & Networks Tasks

Copy the below tasks that uses the dcnm_vrf and dcnm_network modules for creating VRF(s) and Network(s) as part of an overlay. Again, the fabric parameter takes the fabric name from either group_vars/prod.yml or group_vars/staging.yml file you created in the previous section, while the config this time comes from the group_vars/all.yml.


touch /home/pod3u1/LTRDCN-2654/ansible-ndfc/roles/create-overlay/tasks/main.yml

cat <<EOF > /home/pod3u1/LTRDCN-2654/ansible-ndfc/roles/create-overlay/tasks/main.yml

---

- name: Create Tenant VRF
  cisco.dcnm.dcnm_vrf:
    fabric: "{{ fabric.name }}"
    config: "{{ vrfs }}"

- name: Create Networks
  cisco.dcnm.dcnm_network:
    fabric: "{{ fabric.name }}"
    config: "{{ networks }}"

EOF 

Continue to the next section to build your playbooks for switch discovery and creating another overlay using the variables and roles you have now constructed.