Live Chat
Monday - Friday 8am - 6pm EST Chat Now
Contact Us
Monday - Friday 8am - 8pm EST 1-800-268-7737 Other Contact Options

Cart () Loading...

    • Quantity:
    • Delivery:
    • Dates:
    • Location:


Introduction to Network Automation with Python and Ansible

New – Learn how to use Network Automation with Python and Ansible.

GK# 5896

Course Overview


No two networks are the same! Learn to automate your network with a Python and Ansible skillset. This course can be taught across all major (and most minor) network vendors. Course demonstrations can be adapted to best-fit the customer’s network to ensure all lessons have maximum relevance.


  • Delivery Format:
  • Date:
  • Location:
  • Access Period:


What You'll Learn


This course teaches students to blend Python skillsets with Ansible through the lens of automating networks. Automation techniques for the most popular vendor (incl. Cisco, Juniper, Arista) will be subjects of study, however, students may request examples from vendors within their own environments. Topics begin with a focus on automating networks with Python; this skill set is then folded into a broadening understanding of automating with Ansible. Students will have programmatic experience automating enterprise class networks by the conclusion of this course (includes writing custom Ansible modules with Python).

Below is detailed information regarding what you will learn in this class:

What You'll Learn

Day 01

Critical Python Catchup & Review

  • Overview of Python and Ansible
  • Python white space rules & best practices
  • Conditional expressions
  • Relational and Boolean operators
  • Lists, Tuples, Dictionaries
  • Indexing and slicing
  • Built-in functions
  • Writing custom functions
  • Getting at methods
  • Iterating with Loops (for and while)
  • Working with files
  • Software Control Management (SCM) (Git, Github, Bitbucket, Cloudshare, etc.)
  • Getting at RESTful interfaces with Python
  • Working with JSON
  • Python, Ansible and Paramiko
  • Using Paramiko to SSH with keys and passwords


Day 02

Python and Network Automation

  • RESTful API review
  • API keys
  • Paramiko Review
  • Using Paramiko to SFTP with keys and passwords
  • Introduction to Netmiko (automating routers and switches)
  • Using Netmiko to send commands to / from network devices
  • Working with YAML
  • Converting JSON to YAML with Python


Day 03

Critical Ansible Catchup & Review

  • Ansible keywords
  • YAML and JSON for data exchange
  • Ansible and YAML
  • Ansible Playbook components
  • Tying together Python and Ansible – Using Python within Ansible
  • Ansible Network Modules
  • What is new in Ansible (most current updates / release notes)
  • Network Agnostic modules
  • Writing network playbooks
  • Reviewing the construction of network playbooks
  • Writing Ansible playbooks that respond to network failures


Day 04

Blending Python and Ansible Skillsets

  • Review how to use Python within Ansible
  • Calling Python scripts with Ansible
  • Jinja2 Templating Engine for Python (and Ansible)
  • Using Templates in Ansible playbooks
  • Jinja2 filters, looping, and other useful tricks for automating with Ansible
  • Playbook tagging for selective runs
  • When to use Python and when to use Ansible
  • “Big Picture” options for using Python & Ansible within your Network
  • Ansible Roles


Day 05

Customizing Ansible with Python

  • Review – Running Scripts with Ansible
  • Prompting for Ansible user input
  • Ansible Galaxy & Getting at Roles
  • Writing a custom Ansible Module with Python
  • Ansible “Engine” vs Ansible “Tower” – marketing hype, capabilities, costs, etc.
  • Case Study: Automate your Enterprise Network
  • When to use Python and when to use Ansible
  • Writing your own Ansible modules in Python
  • “Big Picture” options for using Python & Ansible within your Network
  • Overview - NETCONF / YANG and what they mean for Python and Ansible
  • Molecule – Testing your roles



  1. Using vim
  2. Using & Installing Python
  3. Making a Github account
  4. Data within mixed lists
  5. Understanding More about Lists
  6. Python Dictionaries
  7. Getting dir(obj) help() and pydoc
  8. Copying Files and Folders
  9. Moving and Renaming Files and Folders
  10. IPv4 Testing with if
  11. Paramiko - SSH with RSA Keys
  12. Paramiko - SFTP with UN and PW
  13. Space APIs the Final Frontier
  14. More APIs - Final Frontier is Vast
  15. Interaction with APIs - NASA 01
  16. Interaction with APIs - NASA 02
  17. Install GNS3
  18. Setup for GNS networking
  19. Configure the Switches
  20. Running Netmiko
  21. Running your first Playbook
  22. Debug Module
  23. Playbook Prompts
  24. register and when
  25. EOS Get Config and Archive
  26. Agnostic Network Modules
  27. Network Playbook Error Handling
  28. Network Playbook Precheck
  29. Network Playbooks with Roles and Rollbacks
  30. Securing Playbooks with Vault
  31. Network Playbooks, Set Fact, and Fail
  32. Debug, Loops, and YAML Lists
  33. Running a script with Ansible
  34. Jinja Filters
  35. Ansible, Python Methods, and Jinja Filters
  36. Ansible and APIs
  37. Python and Ansilbe
  38. Writing an Ansible Module with Python
  39. AWX Tower
  40. Molecule – Testing Roles

Who Should Attend


Networking professionals who are seeking skills in network automation.

Course Delivery
Request this course in a different delivery format.