Interview Prep/Ansible/Fundamentals and Architecture

How does Ansible manage network devices that cannot run Python?

AdvancedConceptFundamentals and Architecture
Answer

Network modules run on the control node, not the device. The control node opens a session with a network connection plugin (ansible.netcommon.network_cli over SSH, netconf, or httpapi), sends CLI commands or API calls, and parses the output.

[routers:vars]
ansible_connection=ansible.netcommon.network_cli
ansible_network_os=cisco.ios.ios
ansible_user=admin

This is why ansible_network_os is mandatory and why network playbooks use platform collections like cisco.ios, arista.eos or junipernetworks.junos. Facts and idempotency depend on the resource modules (ios_vlans, ios_interfaces) rather than raw CLI.

All Ansible questions Roadmap: Ansible

More on Fundamentals and Architecture