These examples were created for the Cisco Identity Services Engine (ISE) Webinar: ISE 3.1 APIs, Ansible, and Automation delivered on July 6, 2021.
Clone this repository to your local lab or sandbox environment :
git clone https://github.com/1homas/ISE_APIs_Ansible_Automation_WebinarInstall Python 3.9 (tested with 3.9.5) :
sudo apt install python3.9.5Use the latest version of PIP :
pip3 install --upgrade pipUse a virtual environment for Python :
pipenv install --python 3.9
pipenv shell
python --version # Python 3.9.5+Install the ciscoisesdk, ansible, and jmespath Python packages :
pipenv install ciscoisesdk
pipenv install ansible
pipenv install jmespathInstall the latest version of the cisco.ise Ansible collection with the --force option:
ansible-galaxy collection install cisco.ise --forceInstall the community.general Ansible collection to take advantage of json_query and other filters :
ansible-galaxy collection install community.generalView the list of installed Ansible modules and versions :
ansible-galaxy collection listSource the source_me.sh file to set the prompt and a few environment variables to ignore some warnings.
source source_me.shThe steps below assume you will be cloning this repository into the DevNet Sandbox and running it there. If you use them in your own lab then you will need to create a different hosts file and update the credentials.yaml file for your environment.
ansible-playbook 1.Ansible_Playbooks_Intro/1.0.Hello_World.yaml
ansible-playbook -i hosts.DevNet.ini 1.Ansible_Playbooks_Intro/7.ISE_Version.yaml
ansible-playbook -i hosts.DevNet.ini 2.Basic_ISE_Playbooks/2.Show_NetworkDeviceGroups.yaml ciscoisesdkPython Package | API Docs | Repositorycisco.iseAnsible Modules | Documentation | Repository
If want a lab environment to try API, Python scripting, or Ansible with ISE, you may use the Cisco DevNet Sandbox ISE with Ansible Automation for free! It is the same sandbox used for the Learning Lab below so you can try this repository or your own projects!
An overview of using REST APIs, OpenAPIs, Postman, and Ansible for Automation with ISE. If you want a lab to help you understand everything in this repository, this is your best place to start! 6 Learning Labs / 2 Hours
- ISE APIs, Ansible, and Automation Overview 🕓 20 min: - An overview of using REST APIs, OpenAPIs, Postman, and Ansible for Automation with ISE
- ISE REST APIs 🕓 20 min: Learn about the ISE REST APIs
- ISE and Postman: Part 1 🕓 20 min: Use Postman to interact with the ISE APIs. Use a workspace, customize a collection, and use environments
- ISE and Postman: Part 2 🕓 20 min: Import ISE collections in Postman, create a user, work with Active Directory, and add endpoints
- ISE and Python 🕓 20 min: Use Python to interact with the ISE APIs
- ISE and Ansible 🕓 20 min: Use Ansible to manage and automate ISE.
This repository is licensed under the MIT License.
