Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Implement connection plugin for podman #47519
This is a new connection plugin for podman container manager.
Please see test_connection.inventory file for instructions how to test this.
The reason why this is WIP is that when I change
I'm also not interested in changing the posix.sh file, this is just current iteration how I tried to debug and fix stuff.
I believe this is due to how we expand remote paths:
We effectively run
Based on what you have found, it appears as though there is no user with a username of
@TomasTomecek Thanks for submitting this. I'm working on a suite of Podman modules for TripleO, and this connection plugin was on my list.
Matt, thank you, that's so helpful!
Unfortunately that doesn't work well for containers. The thing is that it's a fairly normal use case to run a command in a container under a user which is not defined in
I'm not sure if we can change that logic or whether I should handle such case inside the connection plugin.
Sam, thanks for update! I'll definitely take a look. Maybe to give you some context, I wrote buildah connection plugin back then for ansible-container. Doing podman now pretty much for the same reason.
Edit: playing with this right now and the other problem is this command:
Again, we would need to change the script so it would work with containers. Therefore I'm dropping support for remote_user for now.
The logic for expanding the remote path has gone through many iterations to cover as many edge cases as possible. What we have currently we believe is the most flexible.
However, you might add a note with this connection plugin that
I don't know much about podman, but fwiw, we already support various container types as connection plugins, and we haven't run into your scenario before.
As far as handling it in the connection, I don't think that can be easily influenced from the connection plugin, since the command building is handled in the action plugin. I don't think we would accept code that tried to parse those commands and modify them from the connection.
@sivel, you're a genius!
Unfortunately it didn't.
changed the title from
WIP: Implement connection plugin for podman
Implement connection plugin for podman
Oct 25, 2018
I wanted to do some testing with it first. Seems to work very well. Thank you for writing this (and for including tests). Just a few minor changes to the documentation.
Nov 1, 2018
1 check passed
So stoked to have this!! Gonna write that blog post so that people know how to use this.
Sam and Matt, thanks a lot for your help!
Update: here it is: https://blog.tomecek.net/post/ansible-and-podman-can-play-together-now/