Well on the client side you can run any language. Ansible uses the shebang on 
the task module to execute the script. I have even written a custom module that 
runs powershell on a linux client. You could run bash. As long as you output 
json object  ansible will just execute and return it back.

Get Outlook for iOS<https://aka.ms/o0ukef>
________________________________
From: [email protected] <[email protected]> on 
behalf of Jean-Yves LENHOF <[email protected]>
Sent: Thursday, February 25, 2021 9:16:57 AM
To: [email protected] <[email protected]>
Subject: Re: [ansible-project] Ansible Without Python?

Hi,

There's part of the code that run on the controller, but also on the client.

Today you can run the same ansible code on unix and linux server because
the python binary is the one used on the client side, if using a
compiled language you need to have all the binary version of all your
potentials clients os.

Regards,

JYL

Le 24/02/2021 à 20:33, Jon Forrest a écrit :
> I had a radical thought the other day. Would it be possible to
> replace Python as the language used by Ansible with a compiled language,
> perhaps Go because of its fast compile and link speed? Note that I'm not
> talking about something like the existing Ansible shell module, which is
> only useful in environments without Python (or Go).
>
> This is actually two questions because the answer depends on
> whether we're talking about the controller or the client.
> On the controller it would be a simple matter of software
> to rewrite Ansible to produce the same Python it produces
> today. I suspect, but have no data to support, that an Ansible
> controller would run much faster this way, especially in large
> environments.
>
> Go Ansible on the client would be much harder and I think is less
> likely to produce positive results. Obviously each client
> would have to have a working Go environment. I suspect that
> it would be no more difficult to make this happen than it is
> to put a working Python environment on a client.
>
> At first glance it isn't clear that the size of such an environment
> would be smaller in Go than in Python. Indeed, the size of the Go 1.16
> installer for Windows is roughly 100MB larger than that for
> Python 3.9.2. However, if this is an issue I suspect that a striped down
> working Go environment could be created that's much smaller.
>
> Another step necessary on the client would be the creation of
> a pre-compiled Go Ansible runtime. With this present on each
> client, the Ansible controller would only have to send the
> minimal amount of Go code to the client, which would then compile
> that code, and link it with the Go Ansible runtime. It's only
> because Go has such an incredibly fast compiler and linker that
> Go Ansible is worth considering.
>
> I suspect, but again can't prove, that various clever caching techniques
> could be using on the client to reduce the amount of compiling
> and linking that needs to be done.
>
> For simple small environments what I'm thinking about wouldn't make much
> difference. However, there are some huge Ansible environments out there
> that I could see benefiting from what I have in mind.
>
> Thoughts?
>
> Cordially,
> Jon Forrest
>
>
>
>
>

--
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/bdcd2006-79e7-9155-8007-2678dd3166fd%40lenhof.eu.org.

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/SYBPR01MB56169C093B3073FD5820A0B3AD9F9%40SYBPR01MB5616.ausprd01.prod.outlook.com.

Reply via email to