Network automation lab 27 of 27
Ansible across four vendors: IOS, EOS, Junos and RouterOS
One Ansible project for Cisco, Arista, Juniper and MikroTik: a connection plugin per platform, one source of truth, one report, and a baseline playbook that dispatches to each vendor's modules, stays idempotent, shows check mode and diff, and finds drift. Includes what to do when a module's Python library isn't there.
Run this lab
It needs Lite: its 5 nodes are set to 6 vCPU and 7,936 MB in total. That fits the free demo too.
In your workspace: Shared, then Network Automation - CCNA and CCNP Automation guided labs, then 27 - Ansible across four vendors - IOS EOS Junos and RouterOS
- Level
- Advanced
- Time
- About 80 minutes
- Nodes need
- 6 vCPU, 7,936 MB
- Smallest plan
- Lite
The scenario
With Northern Haulage on board, Kestrel Freight now runs four network operating systems, and the audit team wants the same baseline on all of them: the same NTP server, syslog server, SNMP location and login banner. You already know Ansible from the Cisco labs. This time you'll build one project that holds all four vendors, keeping what's shared in one place and what differs where it's easy to find.
| Device | Platform | Mgmt address | Group | How Ansible reaches it |
|---|---|---|---|---|
| r1 | Cisco IOS 15.9 (IOSv) | 10.10.20.11 | ios | network_cli (SSH) |
| eos1 | Arista EOS 4.33 (vEOS) | 10.10.20.31 | eos | httpapi (eAPI over HTTPS) |
| srx1 | Juniper Junos 24.4 (vSRX) | 10.10.20.41 | junos | netconf (port 830) |
| mt1 | MikroTik RouterOS 7.14 (CHR) | 10.10.20.61 | routeros | network_cli (SSH) |
What you’ll practise
- Explain ansible_connection and ansible_network_os, and choose network_cli, httpapi or netconf per platform
- Keep vendor differences in group variables and task files, and shared data in one place
- Gather facts from four vendors and write one report with a Jinja2 template
- Apply a baseline with resource modules, config modules and hand-built idempotence
- Use check mode, diff and a read-back playbook, and find and repair drift
- Recognise a missing Python dependency and work around it without installing anything
The tasks
- Read the project
- Teach Ansible the other three platforms
- One report for four vendors
- One entry point for the baseline
- Arista and Juniper
- RouterOS: idempotence by hand
- Preview, apply, prove
- Find and repair drift
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
- devbox
eth0to Mgmt (network) - r1
Gi0/0to Mgmt (network) - eos1
Management1to Mgmt (network) - srx1
fxp0to Mgmt (network) - mt1
ether1to Mgmt (network)
| Node | Device | Image in Add Node | Set to |
|---|---|---|---|
| devbox | EVE-NG GUI server (Docker) | eve-gui-server:latest | 1 vCPU, 1,024 MB |
| r1 | Cisco IOSv | vios-adventerprisek9-m.spa.159-3.m9 | 1 vCPU, 512 MB |
| eos1 | Arista vEOS | veos-4.33.1.1F | 1 vCPU, 2,048 MB |
| srx1 | Juniper vSRX NextGen template | vsrxng-24.4R1.9 | 2 vCPU, 4,096 MB |
| mt1 | MikroTik RouterOS | mikrotik-7.14.2 | 1 vCPU, 256 MB |
How to open this lab
Sign in to your workspace at
lab.cloudlabbox.com.In File Manager, open Shared, then the folder
Network Automation - CCNA and CCNP Automation guided labs.Open
27 - Ansible across four vendors - IOS EOS Junos and RouterOSand 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 Network automation 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.