
Mastering Ansible automation for network engineers offers hands-on demonstrations on writing effective playbooks and tasks, with practical network automation use cases and lifetime access for ongoing learning.
Mastering Ansible Automation for Network Engineers provides a hands-on walkthrough of lab setup, YAML playbooks, Ansible Vault, and iOS and EOS modules for network automation.
Install Cisco Modeling Lab free tier in VMware Workstation, add devices, and set up a development environment with Ansible and Python using Paramiko, VS Code, and GitHub.
install ubuntu in a bridged vm alongside vmware workstation and cisco modeling lab, set up vscode and ssh, and integrate with github to clone and manage automation projects.
Install and set up Linux for running Ansible, using Ubuntu in VMware or WSL, and review supported OS and lab tools like GNS3 VM and VSCode remote development.
Install Ubuntu in VMware Workstation and configure network interfaces—NAT and host-only—for running Ansible and connecting to Cisco devices in Gns3 VM.
Import and install the Gns3 VM in VMware Workstation, configure NAT and host-only networks with nested virtualization, then verify reachability between the Gns3 VM and Ubuntu.
Import a Cisco vIOS image into the Gns3 VM and create the appliance template. Configure the device, enable ssh, and test host access, noting ssh algorithm issues with older systems.
Commands
sudo vi /etc/ssh/ssh_config
KexAlgorithms diffie-hellman-group1-sha1,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1
HostKeyAlgorithms +ssh-rsa
Install and configure VS Code on Windows, add remote development and Ansible extensions, and connect via Remote SSH to an Ubuntu VM running in VMware to edit Ansible playbooks.
install Windows subsystem for linux on windows, enable required features, and install ubuntu 20.04. enable remote development with the vs code server inside wsl and connect via vscode.
Set up a GitHub repository for learning, add it to VS Code, and store all your code remotely, so you can clone the private repo and work from another machine.
Install Cisco CSR 1000 V in a GNS3 VM by importing the appliance, allocating memory, booting, configuring hostname, domain name lab.com, crypto key RSA 2048, and SSH, then verify connectivity.
Learn how to set up solar putty for ssh, add devices and credentials, manage sessions for multiple devices, customize font size and appearance, and save settings.
Discover how Ansible automates IT operations across networks, servers, and cloud resources, and compare Ansible Core with the community package, versioning, and release roadmaps.
Install and configure Ansible on Ubuntu using pip in a virtual environment. Choose the community package for network automation and verify with version and module lists.
Explore the difference between ansible core and the ansible community package, learn about 2.10’s naming shift to core, collections on Galaxy, and using fully qualified collection names.
Explore ad hoc commands in Ansible, targeting devices with network CLI, and use Cisco iOS modules with inventory basics and Paramiko setup.
Learn how to create and manage an ansible configuration file using VSCode, set up a git repository for easy migration, and verify config location and inventory with a simple playbook.
Create and manage an ansible inventory file, explore formats and groups, and configure host variables for network devices using network CLI with Cisco iOS.
Understand valid Ansible variable names by using letters, numbers, and underscores, and avoiding hyphens. Variables cannot start with a number, may begin with an underscore, and lint flags invalid names.
Explore yaml files, the yaml ain't markup language data serialization format used for ansible playbooks and other tools; learn about sequences, mappings, indentation, and common data types.
Master Ansible playbooks to automate network tasks by describing plays, tasks, and variables; connect to devices via inventory groups, gather facts, and print device details with the debug module.
Explore how Ansible lint analyzes playbooks to enforce coding standards and improve quality. Install, run ansible-lint, and fix issues like invalid variable names, fqdn usage, and jinja2 formatting.
Learn to enable SSH key based authentication on Cisco devices with Ansible, manage credentials by host and group vars, and use private keys and YAML inventories for secure automation.
Learn how to use Ansible vault to encrypt strings and files, protecting data at rest while decrypting during playbook execution and avoiding secret disclosure with no_log and vault ID management.
Encrypt a file in the inventory with Ansible Vault, decrypt with the vault password, and use the encrypted secure_data.yaml in a playbook to access API key and license key variables.
Learn to simplify Ansible by moving vault IDs and passwords from the CLI to a configuration file, enabling automatic decryption of secure data for Cisco device playbooks.
Learn how to organize device variables with Ansible group_vars and host_vars in inventory and playbook directories, and apply variable precedence to configure IP domain name on Cisco IOS devices.
Learn to use host_vars to access host-specific variables by creating a host_vars directory and host files, and understand how inventory or playbook location affects lookup precedence.
Master Cisco iOS facts module with Ansible to gather device facts and configurations, control gather subsets and network resources, and extract net config and L3 interfaces.
Learn how to use the Ansible debug module to print variables or messages, explore options like message, var, and verbosity, and handle multi-line output with literal and folded scalars.
Mastering ansible automation for network engineers shows how to use the Cisco iOS command module to run show commands, wait for conditions, and parse multi-device outputs across a router lab.
Learn to handle commands with prompting using iOS command module in Ansible. Build a command dictionary and use group vars to adapt interface numbering for VI OS and CSR devices.
Learn how to configure iOS devices with Ansible using the ios_config module, enforce idempotent changes, and enable robust backups with customizable directories and timestamped filenames.
Learn to use the diff against option in the Cisco IOS config module with Ansible, comparing running, startup, or intended configs via file lookups and diff ignore lines.
Explore how the Ansible iOS config module uses the parents option to identify the proper configuration hierarchy, enabling idempotent changes to interfaces and global commands.
Learn to handle nested parent commands in Cisco iOS config using the archive feature within an Ansible playbook, configuring archive log options and paths across multiple parent layers.
Explore using the Cisco iOS config module's source file option to configure devices from a file or Jinja2 template, ensuring idempotent changes via relative or full path templates in playbooks.
Demonstrates the configuration save option in the Cisco iOS config module, comparing saved, modified, and changed behaviors and showing how Ansible writes running config to startup config.
Explore how the before option in the Cisco iOS config module lets a playbook run configuration commands before pushing changes to a device, with ACL examples.
Explore how the after option in the Cisco iOS config module lets a playbook append commands after a command set for automation by network engineers.
Explore the configuration match option in Cisco IOS config with Ansible, including default line matching, strict and exact modes, and verify the running configuration against the intended block.
Demonstrates using the Cisco iOS config module’s configuration replays option in an Ansible playbook to replace only changed lines or entire blocks in the running config.
Learn Ansible Automation skills from scratch to an advanced level for automating your Network.
Gain an in-depth understanding of Ansible Playbook and Task Options
For attending this course you don't need any prior coding experience.
100% Hands-on demonstration of the concepts using Network Automation Usecases
The IDE is VS Code and Cisco devices will be used for demonstrating most of the device interactions.(vIOS, IOS-XE)
This course includes steps to setup Cisco Modeling Lab (CML) Free Tier for automation Practice
Below are the topics in high level
The course will be starting with how to setup Lab for Ansible Network Automation Practice
Install and Setup Ubuntu OS VM for ansible
Setup VSCode for SSH remote development
Ansible installation in the Python VIrtual Environment
Ansible Core and Community difference
Inventory and Config file setup
YAML File ,Playbook fundamentals and Ansible Lint
SSH Keybased Authentication to Cisco devices from Ansible
Ansible Vault for encrypting files and variables
Demonstration of Ansible Vault ID
group_vars and host_vars
Handle device specific variables and configurations effectively
Explore advanced features of Ansible CLI
cisco ios_facts and ios_commands module
cisco ios_config module explained in detail
PaloAlto Firewall Galaxy Collections Examples
PaloAlto Address Objects, Object Groups and Security Rule automation using Ansible
Cisco config diff, parent command, before, after, match and replace options
ios config backup options
Configuration backup and save option
Cisco ios resource modules
cisco interfaces, l3_interfaces and l2_interfaces resource module
cisco ios_user and static_route module
CLI Parsers
pyATS, ntc_templates and TextFSM Parsers
Ansible Magic Variables
hostvars and play_vars
set_fact vs vars explained
Ansible Variable precedence explained in detail
Ansible filter Plugins
default, ternary, dict2items, items2dict filters
to_json, from_json, to_yaml, from_yaml filters
zip, combine, map,json_query(using JMES Path) filters
ip_address, url and datetime filters
list operations and string manipulation using filters
RegEX Filters
Regex search, find_all and replace filters
Jinja2 templates example
jinja2 for loop and include option
jinja2 in ios_config module
embed code in jinja2 template
lookup Plugins
file lookup, template lookup plugins
vars, env and pipe lookup plugins
Loops and Conditionals : loops, until and when
Play Options
ansible play strategies, forks and serial
debugger for effective troubleshooting
host order, log_path
tags and limit option
check_mode
Task Options
delegate_to
run_once
ignore_erros and failed when
changed_when and no_log
use handlers and listen option
block and rescue for exception handling
assert option
How to install ansible collections: using galaxy command, requirements file and github
How to create roles and add tasks to respective directories
Detailed explanation of ansible include vs import
include_tasks vs import tasks
include_role vs import role
import_playbook module
how to create ansible custom modules
convert facts to csv file using custom module which uses python csv in the backend
how to pass module args to custom module
how to return data using custom module
REST API from Ansible
how to use URI Module for REST API
YANG Suite introduction
REST API from Postman
Convert POSTMAN REST request to Ansible URI task
Initiate REST - GET, PUT,POST PATCH and DELETE Operations from Ansible
How to configure Cisco device using REST API
how to save config using rest API
Parse config using REST API
Extra Learning Topic(AWX)
Install AWX in Minikube for learning
Basics of Ansible execution environment (Podman)