AnsiballZ overhead when your hosts already have all modules and dependencies

Hello,

I am thinking about an idea to put Python and Ansible together with modules, plugins, and other dependencies into one static binary executable.

Then I am going to distribute such a binary to all my hosts, including Ansible master, and use it as ansible_python_interpreter.

With this approach, all dependencies for the modules will already be on managed hosts. Thus I can avoid the AnsiballZ overhead associated with compressing a module on Ansible master and transferring it to managed hosts. That is, ANSIBALLZ_TEMPLATE will be much simpler and it becomes no longer necessary to copy the compressed module.

What is the cleanest way to customize Ansible to implement this idea?

As of right now, that idea has been previously rejected. I implemented such a change that would only copy the args for the module to the remote host, but depended on Ansible being installed on the target.

Ultimately this was seen as too fragile, and we have plans to evaluate other options later.