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

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
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.

DevicePlatformMgmt addressGroupHow Ansible reaches it
r1Cisco IOS 15.9 (IOSv)10.10.20.11iosnetwork_cli (SSH)
eos1Arista EOS 4.33 (vEOS)10.10.20.31eoshttpapi (eAPI over HTTPS)
srx1Juniper Junos 24.4 (vSRX)10.10.20.41junosnetconf (port 830)
mt1MikroTik RouterOS 7.14 (CHR)10.10.20.61routerosnetwork_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

  1. Read the project
  2. Teach Ansible the other three platforms
  3. One report for four vendors
  4. One entry point for the baseline
  5. Arista and Juniper
  6. RouterOS: idempotence by hand
  7. Preview, apply, prove
  8. 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.

Topology of Ansible across four vendors - IOS EOS Junos and RouterOS5 nodes and 1 network, 5 links. Every link is listed as text below the diagram.devboxr1eos1srx1mt1Mgmteth0Management1fxp0Gi0/0ether1
5 nodes and 1 network, with the interface names each link uses. On a narrow screen, scroll the diagram sideways.
Nodes in Ansible across four vendors: IOS, EOS, Junos and RouterOS, with the image each runs and the vCPU and RAM it’s set to
NodeDeviceImage in Add NodeSet to
devboxEVE-NG GUI server (Docker)eve-gui-server:latest1 vCPU, 1,024 MB
r1Cisco IOSvvios-adventerprisek9-m.spa.159-3.m91 vCPU, 512 MB
eos1Arista vEOSveos-4.33.1.1F1 vCPU, 2,048 MB
srx1Juniper vSRX NextGen templatevsrxng-24.4R1.92 vCPU, 4,096 MB
mt1MikroTik RouterOSmikrotik-7.14.21 vCPU, 256 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 Network Automation - CCNA and CCNP Automation guided labs.

  3. Open 27 - Ansible across four vendors - IOS EOS Junos and RouterOS 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 Network automation labs

All 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.