Description
Following on from #419, now enough of asynchronous connect is done that we can implement proxied become plugins only once. The goal is to be able to proxy a become plugin back to the controller machine.
-
Host the become plugin in the Ansible task worker, either as a service, or perhaps as something driven directly from an existing thread. Preferably avoid starting a service pool in every worker just for this. It wants to be in the worker because third party code might make assumptions about other state alive in the same process
-
Some kind of custom
Connection
/Protocol
that knows how to talk to a remote service or service-like thing. Receives line, forwards it to service, awaits response, feeds response to child process, etc. Probably something that simply installs aRouter.add_handler()
function, maybe try to make it generic to any situation where some asynchronous code needs to wait and respond to other asynchronous code, but that might not be worth the effort -
Make the Mitogen connection method generic to any similar scenario, but pattern it off the request/reply structure of what Ansible needs