[NetSIG] ansible question - How does an ansible module execute on a network device (e.g. router)?

Greg H greg.horie at gmail.com
Fri Jun 25 12:10:15 EDT 2021


I found the answer over here -
https://docs.ansible.com/ansible/latest/network/getting_started/network_differences.html
Execution on the control node
<https://docs.ansible.com/ansible/latest/network/getting_started/network_differences.html#id1>Unlike
most Ansible modules, network modules do not run on the managed nodes. From
a user’s point of view, network modules work like any other modules. They
work with ad hoc commands, playbooks, and roles. Behind the scenes,
however, network modules use a different methodology than the other
(Linux/Unix and Windows) modules use. Ansible is written and executed in
Python. Because the majority of network devices can not run Python, the
Ansible network modules are executed on the Ansible control node, where
ansible or ansible-playbook runs.

Also, found this ...
Multiple communication protocols
<https://docs.ansible.com/ansible/latest/network/getting_started/network_differences.html#id2>

Because network modules execute on the control node instead of on the
managed nodes, they can support multiple communication protocols. The
communication protocol (XML over SSH, CLI over SSH, API over HTTPS)
selected for each network module depends on the platform and the purpose of
the module. Some network modules support only one protocol; some offer a
choice. The most common protocol is CLI over SSH. You set the communication
protocol with the ansible_connection variable ...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://vicpimakers.ca/pipermail/netsig_vicpimakers.ca/attachments/20210625/4ef8d421/attachment.htm>


More information about the NetSIG mailing list