CCNP ENCOR lab 33 of 36
Python, JSON and agentless automation with Ansible
Prepare two routers for automation, then work as Fernhill's first network automation engineer: read and predict a Python script, repair a broken JSON file, fix a Netmiko collection script, and push standard configuration with an agentless Ansible playbook.
Run this lab
It needs Lite: its 3 nodes are set to 3 vCPU and 2,048 MB in total. That fits the free demo too.
In your workspace: Shared, then CCNP ENCOR 350-401 guided labs, then 33 - Python JSON and agentless automation with Ansible
- Level
- Intermediate
- Time
- About 80 minutes
- Nodes need
- 3 vCPU, 2,048 MB
- Smallest plan
- Lite
The scenario
Fernhill Freight has hired its first network automation engineer: you. Your toolbox is the NOC workstation (NMS) with Python 3, Netmiko, TextFSM and Ansible (with the cisco.ios collection). Your first week's jobs:
- Prepare R1 and R2 so tools can log in over SSH.
- Prove you can read Python by predicting a script's output.
- Repair the VLAN definition file a colleague broke.
- Fix the interface-collection script that crashes.
- Push the company's standard NTP server and login banner to every router with Ansible.
| Device | Interface | Address |
|---|---|---|
| R1 | Gi0/1 (NOC LAN) / Gi0/0 | 10.10.50.1/24 / 10.0.12.1/30 |
| R2 | Gi0/1 (NOC LAN) / Gi0/0 | 10.10.50.2/24 / 10.0.12.2/30 |
| NMS | eth0 | 10.10.50.100/24 (desktop: Applications → System Tools → MATE Terminal) |
Automation account on the routers: netops / Fh-Auto-2026 (privilege 15). Files on NMS are in /opt/lab.
Topology: R1, R2 and NMS share the NOC LAN; R1 and R2 are also linked directly.
What you’ll practise
- Interpret Python variables, lists, dictionaries, loops, functions, f-strings and exceptions
- Construct valid JSON and find the usual syntax errors
- Read and fix a Python script that collects data over SSH with Netmiko and TextFSM
- Run Ansible playbooks with the cisco.ios collection over SSH, and check idempotency
- Compare agent-based (Puppet, Chef) and agentless (Ansible, Salt SSH) orchestration
The tasks
- Prepare the routers for automation
- Interpret a Python script
- Repair the JSON file
- Fix the collection script
- Run your first playbook
- Push the standards, twice
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.
Every link, as text
- R1
Gi0/0to R2Gi0/0 - R1
Gi0/1to NOC-LAN (network) - R2
Gi0/1to NOC-LAN (network) - NMS
eth0to NOC-LAN (network)
| Node | Device | Image in Add Node | Set to |
|---|---|---|---|
| R1 | Cisco IOSv | vios-adventerprisek9-m.spa.159-3.m9 | 1 vCPU, 512 MB |
| R2 | Cisco IOSv | vios-adventerprisek9-m.spa.159-3.m9 | 1 vCPU, 512 MB |
| NMS | EVE-NG GUI server (Docker) | eve-gui-server:latest | 1 vCPU, 1,024 MB |
How to open this lab
Sign in to your workspace at
lab.cloudlabbox.com.In File Manager, open Shared, then the folder
CCNP ENCOR 350-401 guided labs.Open
33 - Python JSON and agentless automation with Ansibleand 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 CCNP ENCOR 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.