Collateral for the AnsibleFest 2019 Presentation
AnsibleFest 2019
September 24, 2019
1:00 - 1:45 EDT
A PDF of the slides is located in the root of this project
Obtaining all of the necessary collateral demonstrated follow these steps:
- clone the ansiblefest_2019 repository
This repository contains two additional submodules: the Cisco DNA Center modules and the Cisco DNA Center Inventory Plugin.
git clone --recursive https://github.com/jandiorio/ansiblefest_2019
- Run the
install.yml
to complete the installation.
ansible-playbook -i localhost installation/install.yml
The install.yml
perfoms the following steps:
- Create a
library
subfolder inplaybooks
- Create Links to Modules in
playbooks/library
directory - Create
module_utils/network/dnac
directory - Create
__init__.py
in the directory created - Copy dnac.py to
module_utils/network/dnac
- Install Dependent Python Package - timezonefinder
- Install Dependent Python Package - geopy
The demonstration during the AnsibleFest session used a lab environment in the WWT Advanced Technology Center. Network Automation with Ansible + DNA Center Lab
The playbooks were executed in sequence with 2 steps that were performed manually due to the lack of an existing API.
- Create Site Hierarchy
- Discover Network Devices
- Configure Network Settings
- Site Role Assignments
- Add VLANs to Switches
- Add SVIs to Switches
- Configure AP Port
- Create Dummy Wireless Profile
- Provision WLC
- Provision AP - Manual Step
- Create SSID
- Create New Wireless Profile
- Add Wireless Interface - Manual Step
- Provision WLC
The playbooks are named with a numerical prefix indicating the corresponding step from the above list.
-rw-r--r-- 1 root root 2580 Sep 16 14:50 1-create-hierarchy.yml
-rw-r--r-- 1 root root 717 Sep 16 14:50 11-create-wireless-ssid.yml
-rw-r--r-- 1 root root 918 Sep 16 14:50 12-create-wireless-profile.yml
-rw-r--r-- 1 root root 921 Sep 16 14:50 14-provision-wireless.yml
-rw-r--r-- 1 root root 3121 Sep 16 14:50 2-discover-devices.yml
-rw-r--r-- 1 root root 5782 Sep 16 14:50 3-create-network-settings.yml
-rw-r--r-- 1 root root 1468 Sep 16 14:50 4-site-role-assignments.yml
-rw-r--r-- 1 root root 959 Sep 16 14:50 5-declarative_l2_vlans.yml
-rw-r--r-- 1 root root 2109 Sep 16 14:50 6-declarative_l3_interfaces.yml
-rw-r--r-- 1 root root 1077 Sep 16 14:50 7-config-ap-port.yml
-rw-r--r-- 1 root root 735 Sep 16 14:50 8-create-dummy-wireless-profile.yml
-rw-r--r-- 1 root root 1044 Sep 16 14:50 9-provision-wireless.yml
Each playbook has a reference to the commandline string to execute:
`ansible-playbook -i inventory/hosts.yml playbooks/1-create-hierarchy.yml -e "{'host_groups':'dna_3_dnac','desired_state':'present'}" --ask-vault-pass`
If you are using your own environment some things need to change:
./inventory/hosts.yml
needs to change to match your DNA Center environment./vars/password.yml
needs to reflect the credentials for your environment./inventory/inventory_plugins/dna_center.yml
needs to change for your environment
If you would like to use our environment, just navigate to www.wwt.com and register for an account. The link to this environment is at the top of this section.
The modules are installed as a submodule within this project, but if you wanted to pull them directly, you can find them here:
The source for the inventory plugin can be found here:
This solution is Copyright (c) 2019 World Wide Technology. All rights reserved. A copy of the applicable end user license agreement for this solution can be obtained by emailing AutomationTeam@wwt.com.
Jeff Andiorio - jeff.andiorio@wwt.com