-
Notifications
You must be signed in to change notification settings - Fork 23.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Docker connection plugin: allow to use Docker SDK for Python #66114
[WIP] Docker connection plugin: allow to use Docker SDK for Python #66114
Conversation
b272bd2
to
3270313
Compare
8631f34
to
f50baae
Compare
For me, right now, everything is working as follows:
|
I managed to fix SSH transport compatibility (the main problem was that |
I have no idea how to fix the remaining problem (write connection shutdown for TCP+TLS); somehow related: urllib3/urllib3#1626. |
Ok, I also got TCP+TLS support working, with a pretty ugly workaround though. Next I'll try to figure out why on earth CI produces these |
Hi @felixfontein, Thank you very much for your interest in Ansible. This plugin/module is no longer maintained in this repository and has been migrated to https://github.com/ansible-collections/community.general |
SUMMARY
Allows the docker connection plugin to use Docker SDK for Python (aka docker-py) to communicate with the docker daemon, as opposed to using the
docker
CLI program. By default, it auto-detects whether to use thecli
driver (i.e. use thedocker
CLI program) or thedocker-py
driver (i.e. the Docker SDK for Python), but the user can force the decision.Fixes #17692.
There are currently some problems / things not implemented / working:
Up- and downloading files requires the files to fit into memory. It would be nice to stream them, to reduce memory usage. That will definitely require some more work.
sudo
seems to work (haven't tested other become plugins), but pipelining right now isn't: it looks like passing larger amounts of data via stdin is not working, and it hangs after sending the data.There's no way to configure how to talk to the docker daemon yet. That's the easiest to add :)
I also had to touch the
synchronize
module; it won't work with the new Docker SDK for Python driver, as opposed to thedocker
CLI driver, since there's nodocker
executable we can just use.CC @ssbarnea
ISSUE TYPE
COMPONENT NAME
lib/ansible/plugins/connection/docker.py