This repo is a derivative of the full CI/CD Pipeline described in the sdwan-devops aimed just at daily operational tasks. It is based on the Cisco SD-WAN Ansible Modules.
The repository contains the Cisco SD-WAN Ansible Modules as a submodule. To clone the repo with the submodule:
git clone --recursive https://github.com/ciscodevnet/sdwan-ops
- ansible
- requests
pip install -r requirements.txt
These playbooks all take the following extra-vars:
vmanage_host
: The IP address or DNS name of vmanagevmanage_user
: User with adminsitrator privileges on vmanagevmanage_password
: Password for the user specified
Note: These vars can also be set in inventory
Display facts about the devices in vmanage (e.g. controllers, out of sync edges, free devices, etc.). This can be used as the basis for other playbooks
ansible-playbook device-facts.yml -e vmanage_host=1.2.3.4 -e vmanage_user=admin -e vmanage_password=admin
The following playbooks will export both templates and policy from vmanage in there entirety into a JSON file. In addition, they will import both templates and policy from a JSON file into vmanage, adding only the templates and/or policy that is not already present (i.e. idempotent)
Extra Vars:
file
: the name of the file to either export to or import from.
ansible-playbook export-templates.yml -e vmanage_host=1.2.3.4 -e vmanage_user=admin -e vmanage_password=admin
ansible-playbook export-policy.yml -e vmanage_host=1.2.3.4 -e vmanage_user=admin -e vmanage_password=admin
ansible-playbook import-templates.yml -e vmanage_host=1.2.3.4 -e vmanage_user=admin -e vmanage_password=admin
ansible-playbook import-policy.yml -e vmanage_host=1.2.3.4 -e vmanage_user=admin -e vmanage_password=admin