Re: [ansible-project] How does ansible execute modules remotely?

33 views
Skip to first unread message

Michael DeHaan

unread,
Jul 18, 2012, 7:32:23 AM7/18/12
to ansible...@googlegroups.com


On Wednesday, July 18, 2012 at 7:10 AM, nix85 wrote:

> This may be a stupid question but how does Ansible run modules remotely? I was going through the code a bit and I saw that it uses the Runner library to do so. It first transfers the module to the remote host and then executes it. I am guessing that it copies it to /tmp directory, chmod +x <file> and then executes it.


Not "/tmp" specifically, but "a temp directory", yes. Depends on the user.
>
> if we wrote modules in ruby or lets say Java, we would actually need to have those executables and the modules already existing on the remote (managed) hosts?

Yes, Ruby can't run without a ruby interpreter, and we do execute modules on the client (because they have to change stuff).

I don't expect anyone to be writing them in pure Java.



Reply all
Reply to author
Forward
0 new messages