-
-
Notifications
You must be signed in to change notification settings - Fork 148
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
[DISCUSSION] How to replace easily Docker by Podman for Ansible Docker users? #45
Comments
Amazingly, option 2 works as is: - name: Run docker hidden in podman
containers.podman.podman_container:
name: test-container
image: alpine
state: present
executable: docker
env:
MYSQL_ROOT_PASSWORD: "2211"
So a little action plugin which will replace |
Would any of these options include unifying the output of the modules- or is the assumption that podman would change to match the docker output? For example to lookup an exposed port at the moment:
If it's not feasible to have them behave identically could the Ansible service module be an example to follow- if you're doing something simple use the generic module/wrapper, but if you depend on particular outputs or features use e.g. the systemd module instead? |
@manics thanks, that's a really important question. A lot of tasks rely on
Regarding option to explicitly set an engine, I think it would be totally reasonable to have it, like |
I think the easiest path depends on how the docker modules are implemented.
|
So if you want to replace docker with podman with your collection in ansible playbooks: How to port my playbook? https://github.com/ReinerNippes/selfhosted_on_docker Just pulling and starting a container isn't enough. You have to provide also networking similar to docker. Do you see any chance for this in the near future? |
Issue:
Right now a lot of Ansible users deploy Docker containers using
docker_*
modules of Ansible. Because Docker is not supported on RHEL-8/CnetOS-8 officially and user might want still to use their playbooks and roles, instead of rewriting them. Podman is supposed to replace Docker in RH-8 distros. Current there are a fewpodman_*
modules.How can we make migration of
docker_*
users as easy and transparent as possible?For example task:
What is the best solution (considering collections) that can allow user to continue using this task in Podman only host?
The ideal situation is:
Currently options on the table are (additional are welcome!):
containers.whatever
collection. It will pick up podman and docker collections and each action module will trigger either docker or podman module, depending on what is on the host. Kind ofpackage
module model.containers.docker
. Most of usual things would work. Some, like pods and other specific, will be available for Podman only.generic
container module basing on podman API v2, which should be a copy of Docker-Py. Write it from scratch with support of both Docker and Podman as underlying engines.Also there is an opened question what to do with specific Podman features like pods, play-kube and others. And what to do with Ansible Docker Compose feature.
The text was updated successfully, but these errors were encountered: