LOGBOOK

HELP

Quiz Entry - updated: 2026.10.22

How does Ansible manage network devices like routers and switches when they can't run Python?

The network modules run on the control node, not on the device, and talk to the device over CLI over SSH, XML over SSH (NETCONF), or an API over HTTP(S).

A control node reaches a Linux host over SSH, a Windows host over WinRM, and a router over CLI, NETCONF or an HTTPS API, with the network module running on the control node

* Ansible is installed only on the control node; for network devices the module runs there instead of on the device. *

Playbooks for network devices use the same techniques as playbooks for servers, but execution is different:

  • Most network devices cannot run Python, so Ansible can't push a module to them.
  • Instead the module runs locally on the control node and uses a special connection method to the device:
    • CLI over SSH, sending commands the way an admin would type them (network_cli),
    • XML over SSH, i.e. NETCONF,
    • API over HTTP(S), e.g. RESTCONF or a vendor REST API.

Ansible ships many modules for this, including support for Cisco IOS, IOS XR and NX-OS, Juniper Junos, Arista EOS and VyOS.

Go deeper:

From Quiz: ITIA / Ansible Fundamentals: Automation, Architecture and the Automation Platform | Updated: Oct 22, 2026