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] [2.8] connection/docker: add support for privilege escalation #56277
Conversation
As described in ansible#53385 (and ansible#31759), the docker connection driver did not support privilege escalation. This commit is a shameless cut-and-paste of the privilege escalation support from the `local` connection plugin into the `docker` plugin. Closes: ansible#53385 (cherry picked from commit 61e476b)
for key, event in events: | ||
if key.fileobj == p.stdout: | ||
chunk = p.stdout.read() | ||
break |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this break
should be there (and I guess I missed it in the original PR). It's not in local.py
, either. @larsks where does it come from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh, I haven't the foggiest idea. I didn't do any editing of that content that I recall. Funny that it works. I guess we submit a patch and fix it in the backports? Funny that everything still works. I wish this was all handled in one place...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've created #56288 and will include it in this backport once it is merged.
Your stable-2.7 does not have this code included though...
… to local.py (ansible#56288) * Make more similar to local.py * Fix typo. (cherry picked from commit 708bda0)
Merged for 2.8.1 |
SUMMARY
Backport of #55816 and #56288 to stable-2.8. Fixes privilege escalation for
docker
connection plugin if a passphrase is required.CC @larsks
ISSUE TYPE
COMPONENT NAME
lib/ansible/plugins/connection/docker.py