Skip to content
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

Examples of the ansible connection plugin for podman on remote hosts #172

Open
sebastian-luna-valero opened this issue Jan 11, 2021 · 3 comments
Labels
documentation Improvements or additions to documentation

Comments

@sebastian-luna-valero
Copy link

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)

/kind feature

Description

I have been looking for examples on how to use the Ansible connection plugin for podman on remote hosts, without success.

All examples I have found so far just work with the Ansible connection plugin when both Ansible and podman containers are deployed on the same host. For example: https://blog.tomecek.net/post/ansible-and-podman-can-play-together-now/

I am probably missing something obvious but it would be great if a couple of examples were added to:

https://docs.ansible.com/ansible/2.10/collections/containers/podman/podman_connection.html

Would this be possible, please?

Many thanks,
Sebastian

@sshnaidm sshnaidm added the documentation Improvements or additions to documentation label Feb 10, 2021
@RobVerduijn
Copy link

I second this request,

Currently you have to be really persistent/desperate to even consider using the podman/buildah connection type.

Even after using ansible for some years now for all kinds ( vmware/network/fortios/cisco ) the only obvious thing I saw is that every last one of them has it's own interpretation on how to use a connection plugin and that each one of them (including yours) requires many hours of googling to get them to work due to poor documentation.

Good documentation with real working examples would make it a lot easier for people to start using this collection.

Rob

@FilBot3
Copy link

FilBot3 commented Dec 9, 2021

I imagine that the podman connection plugin operates like the docker one. It probably will require the socket to be enabled, and then Ansible can connect to it.

@m00nwtchr
Copy link

m00nwtchr commented Oct 25, 2024

No, it doesn't connect to the remote socket at all. I was able to make it work with this though:

- name: Add container to inventory
  ansible.builtin.add_host:
    name: container_name
    ansible_connection: containers.podman.podman
    ansible_podman_extra_args: "--url ssh://{{ ansible_user }}@{{ ansible_host }}/run/podman/podman.sock"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

5 participants