Without an agent on target host, Ansible is able to perform tasks like for example: adding a user(`-m user`).
[Here](
https://docs.ansible.com/ansible/latest/modules/list_of_all_modules.html) are the list of all modules
To understand this, I read this [article](
https://www.ansible.com/overview/how-ansible-works), which says:
"Ansible works by connecting to your nodes and pushing out **small programs**, called "Ansible modules" to them. These programs are written to be resource models of the desired state of the system."
--------------------------
My understanding is, `user` module(say) is python module located in control server and this module is serialized on wire to target host, after running `ansible` command with `-m user` option.
------------------------------------
1) Does `ansible` serialize these **small programs**(source code) via ssh to target device? something like `ssh -t user@host 'sh' < path_to_ansible_module_source_code`
2) target device can be a host or network router. Is Python required on target device? to execute these ansible modules serialized from control server to target host..