How ansible works? without an agent on target device

18 views
Skip to first unread message

Ethashamuddin Mohammed

unread,
Jan 28, 2019, 5:32:31 PM1/28/19
to Ansible Project
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..


boncalo mihai

unread,
Jan 29, 2019, 3:30:40 PM1/29/19
to ansible...@googlegroups.com
Hi ,

I'm pretty new with ansible but you can read on ansible website that
ansible requires python to be installed on the remote hosts though
should work using the raw module which sends commands through ssh.
Check https://www.unixarena.com/2018/07/ansible-command-vs-shell-vs-raw-modules.html/

To be more precise I attach this very verbose[ ansible output while
changing passwords for one user on two hosts. You can see there how
ansible works behind the scene

BR
> --
> You received this message because you are subscribed to the Google Groups "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
> To post to this group, send email to ansible...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/fc940fbc-5cea-4337-a4dc-ef0bb938536f%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
ansible.log
Reply all
Reply to author
Forward
0 new messages