Network Automation · Ansible · Cisco IOS

Ansible Network
Automation

Leveraging Ansible to streamline network management tasks — automating configuration retrieval, connectivity verification, and router group management against a Cisco 1900 series router.

Tool: Ansible
Target: Cisco 1900 Router
Network: 192.168.56.107/24
Controller: Ubuntu Linux
View on GitHub ▶ Watch on YouTube

🎯 Project Overview

This project demonstrates the use of Ansible — a powerful agentless IT automation platform — to manage and interact with a Cisco 1900 router programmatically from an Ubuntu controller. Rather than logging in manually via SSH for every configuration task, Ansible modules execute commands across the network in a repeatable, auditable way.

🔍 Why It Was Built

Manual network management does not scale. This project explores how automation tools like Ansible can reduce human error, speed up repetitive tasks, and bring software-development best practices — such as version control and idempotency — into network operations. It also demonstrates the practical application of Network Automation skills in an IOS environment.

🏗️ Setup & Configuration

The project involved the following key configuration steps:

  1. Install Ansible on the Ubuntu controller machine.
  2. Configure ansible.cfg — set host key checking, connection type, and credentials.
  3. Update the hosts inventory file — define a [ciscoRouters] group pointing to 192.168.56.107.
  4. Configure SSH on the Cisco 1900 — assign IP, enable SSH, and test reachability from the controller.
  5. Run Ansible modules — execute ping and ios_command modules against the router group.

⚙️ Key Commands

# Hosts inventory entry
[ciscoRouters]
192.168.56.107

# Verify connectivity with Ansible ping module
ansible ciscoRouters -m ping

# Pull interface brief from router
ansible ciscoRouters -m ios_command -a "commands='show ip interface brief'"

# Run a playbook
ansible-playbook -i hosts router_config.yml

📊 Key Achievements

  • Router Group Creation: Successfully grouped the Cisco 1900 in the Ansible inventory under ciscoRouters.
  • Connectivity Verification: Used the Ansible ping module to confirm network reachability and reliability.
  • Configuration Retrieval: Pulled interface configuration data using ios_command with show ip interface brief.
  • SSH Automation: Configured SSH fingerprint handling in ansible.cfg for seamless non-interactive operation.
View Full Project on GitHub