CCNA lab 38 of 46

Automating IOS with Ansible

Prepare two routers and a switch for automation, then use Ansible from a Linux control node to run show commands everywhere at once, push a baseline that proves idempotency, create a VLAN with a resource module and read device facts as JSON.

Run this lab

It needs Lite: its 4 nodes are set to 4 vCPU and 4,096 MB in total. That fits the free demo too.

In your workspace: Shared, then CCNA 200-301 guided labs, then 38 - Automating IOS with Ansible

Try it free for 30 minutesRun it on Lite from £3 a day

The free demo needs no card and no email. Every lab plan includes every guided lab.

Level
Intermediate
Time
About 60 minutes
Nodes need
4 vCPU, 4,096 MB
Smallest plan
Lite

The scenario

Fenmoor Housing's three-person network team spends Mondays logging in to every device to make the same small changes. They want the routine work automated with Ansible, which they can run from a Linux machine (CTRL) without installing anything on the routers. You'll prepare the devices, then run commands and changes across all of them at once.

DeviceAddressAnsible group
R110.38.0.1/24routers
R210.38.0.2/24routers
S110.38.0.3/24switches
CTRL10.38.0.100/24control node (project in /root/ansible)

What you’ll practise

  • Explain how automation changes network management, and compare Ansible, Terraform, Puppet and Chef
  • Prepare IOS devices for agentless automation over SSH
  • Read an Ansible inventory, group variables and a playbook written in YAML
  • Run ad hoc commands and playbooks with the cisco.ios collection
  • Show idempotency and read gathered facts as JSON

The tasks

  1. Know why and with what
  2. Prepare the devices for automation
  3. Read the project
  4. Run ad hoc commands everywhere
  5. Push a baseline with a playbook and prove idempotency
  6. Use a resource module to create a VLAN
  7. Read facts as JSON

The Lab Tasks pane has the scenario, these tasks, the checks to run, hints and the full solution.

Topology and devices

The network as it opens in EVE-NG, drawn from the lab’s own canvas, and the image each node runs.

Topology of Automating IOS with Ansible4 nodes, 3 links. Every link is listed as text below the diagram.R1R2S1CTRLeth0Gi0/2Gi0/0Gi0/0Gi0/0Gi0/1
4 nodes, with the interface names each link uses. On a narrow screen, scroll the diagram sideways.
Nodes in Automating IOS with Ansible, with the image each runs and the vCPU and RAM it’s set to
NodeDeviceImage in Add NodeSet to
R1Cisco IOSvvios-adventerprisek9-m.SPA.159-3.M61 vCPU, 1,024 MB
R2Cisco IOSvvios-adventerprisek9-m.SPA.159-3.M61 vCPU, 1,024 MB
S1Cisco IOSvL2viosl2-adventerprisek9-m.ssa.high_iron_202009291 vCPU, 1,024 MB
CTRLEVE-NG GUI server (Docker)eve-gui-server:latest1 vCPU, 1,024 MB

How to open this lab

  1. Sign in to your workspace at lab.cloudlabbox.com.

  2. In File Manager, open Shared, then the folder CCNA 200-301 guided labs.

  3. Open 38 - Automating IOS with Ansible and start its nodes, then open Lab Tasks for the scenario and the steps.

The lab is read-only. You can start the nodes and configure the devices, but changes to the topology can’t be saved. To change it, rebuild it in your own folder.

More CCNA labs

All CCNA labs

Related labs in other courses

CloudLabBox is independent of Cisco. The lab follows exam topics and isn’t vendor training material; vendor names identify the exams and the images in the workspace.