Other
Training
Ansible
Network Automation with Python and Ansible (ANSIBLE201)

No two networks are the same! This Network Automation training course teaches students to blend Python skillsets with Ansible through the lens of automating networks. Automation techniques for the most popular vendors (including Cisco, Juniper, and Arista) will be subjects of study, however students may request examples from vendors within their own environments.

Class is a combination of lecture, demonstration, and hands-on labs. Students are invited to share their own relevant Python and Ansible scripts with the instructor to ensure class subjects are as relevant as possible.

Download pdf
Duration: 5 Days
About the course

Prerequisites:

The knowledge and skills that the learner should have before attending this course are as follows:

  • Ansible 101 – Ansible Essentials
  • Coding experience in another language serves as an adequate prerequisite

Objectives:

Upon completing this course, the learner will be able to meet these overall objectives:

  • Version controlling code with Git
  • Open SSH sessions and pass commands to remote servers
  • Remotely open CLI to network devices
  • Move files via SFTP
  • Overview of Ansible modules
  • Ansible collections for network automation
  • Custom Ansible modules with Python
  • Best practices for automating the management and configuration of network devices
Course content

Python and Ansible Overlap

  • Lecture: Introducing Python
  • Lecture + Lab: Getting dir(obj) help() and pydoc
  • Lecture: Data Types for Python and Ansible
  • Lecture + Lab: Python Lists
  • Lecture + Lab: Python Dictionaries
  • Lecture: Ansible Playbook Components
  • Lecture + Lab: Running a Playbook
  • Lecture + Lab: Debug and URI Module
  • Lecture + Lab: Debug, Loops, and YAML Lists

API Operations

  • Lecture: RESTful APIs and JSON
  • Lecture + Lab: Exploring Open APIs
  • Lecture + Lab: Ansible Keywords: register and when
  • Lecture + Lab: API Tokens with Python and Ansible

SSH Operations

  • Lecture: SSH Operations
  • Lecture + Lab: Paramiko vs Ansible - SSH with RSA Keys
  • Lecture + Lab: Paramiko - SFTP with UN and PW
  • Lecture: Ansible for SSH operations
  • Lecture + Lab: Ansible “raw” Module

Ansible Tools

  • Lecture + Lab: Jinja2 Filters
  • Lecture + Lab: Ansible, Python Methods, and Jinja Filters

Switches and Routers

  • Lecture: Netmiko
  • Lecture + Lab: Running Netmiko
  • Lecture + Lab: Network Playbooks, Set Fact, and Fail
  • Lecture + Lab: Ansible Get Switch Config and Archive
  • Lecture + Lab: Agnostic Network Modules
  • Lecture + Lab: Ansible and TextFSM

Playbook Design

  • Lecture + Lab: Network Playbook Error Handling
  • Lecture + Lab: Network Playbook Precheck
  • Lecture + Lab: Network Playbooks with Roles and Rollbacks

Ansible Workflow

  • Lecture + Lab: Ansible Collections
  • Lecture: Ansible Workflow
  • Lecture + Lab: ansible-runner

Security

  • Lecture + Lab: Securing Playbooks with Vault
  • Lecture + Lab: Playbook Vars Prompts

Building out Playbooks

  • Lecture + Lab: Ansible Module - template
  • Lecture + Lab: Ansible and APIs

Python and Ansible

  • Lecture + Lab: Running a script with Ansible
  • Lecture + Lab: YAML, JSON, Dynamic, and Cloud Inventories
  • Lecture + Lab: Writing an Ansible Module with Python
  • Lecture + Lab: When to Use Python or Ansible

Playbook Tests

  • Lecture + Lab: Roles and Molecule

Case Study

  • Lecture + Lab: Ansible for Palo Alto PanOS and Panorama
Who Should Attend

The primary audience for this course is as follows:

  • Network Administrators
  • Ansible Developers
  • Python Developers
  • Administrators interested in Automation
  • Individuals interested in devops, specifically for networking