- Sponsor
-
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
Unable to access remote podman containers via intermediate ssh host #246
Comments
@TomasTomecek any thoughts/suggestions? Not sure if this is a configuration issue, or simply beyond the capabilities of non-ssh connection modules. |
Why not to run podman connection remotely as well? ansible-podman-collections/plugins/connection/podman.py Lines 63 to 70 in ecc0287
At least it was designed for that. But |
Thanks @sshnaidm for the response. I tried changing
Any ideas on what to attempt next? I am not sure how the podman-remote would be able to determine where the remote_container was created since that was done by a containers.podman.podman_container ansible task. |
After much additional trial and error I managed to get something to work. Still assessing how stable it is. One thing I did notice is that podman.service on the remote host is filling up with lots of conmon processes, several for each remotely executed command. They all appear to end with --exit-delay 300 so I'm guessing they will eventually go away, but would be nice if there was a way to be more proactive in cleaning them up. Here is the latest version of the remotehost play in my playbook:
Any suggestions on how to simplify or otherwise wrangle that unwieldy process appreciated. |
Also, since there doesn't appear to be a |
@sshnaidm @TomasTomecek any additional thoughts on being able to use buildah connector remotely? have a similar playbook with local and remote tags. the localhost version works great, but unable to get the remote equivalent to function.
|
/kind bug
Description
I have a playbook to create a podman container on either a remote or a local machine. The podman_container task creates the container and runs it fine in either case. After I add the container to the hosts group and try to use the podman connection to reach it the local play works but the remote play fails.
Steps to reproduce the issue:
Describe the results you received:
fatal: [remotehost]: UNREACHABLE! => {"changed": false, "msg": "Failed to create temporary directory.In some cases, you may have been able to authenticate and did not have permissions on the target directory. Consider changing the remote tmp path in ansible.cfg to a path rooted in "/tmp", for more error information use -vvv. Failed command was: ( umask 77 && mkdir -p "
echo ~/.ansible/tmp
"&& mkdir "echo ~/.ansible/tmp/ansible-tmp-1618771081.7663367-103788-258354183528348
" && echo ansible-tmp-1618771081.7663367-103788-258354183528348="echo ~/.ansible/tmp/ansible-tmp-1618771081.7663367-103788-258354183528348
" ), exited with result 125", "unreachable": true}Describe the results you expected:
Run playbook using local tag and it works. Would like to be able to use the connector on remote machines and not just on the ansible install machine.
Additional information you deem important (e.g. issue happens only occasionally):
I tried several alternatives found with google searches, including several variations of adding
ansible_ssh_host: remotehost
but none were successful.Version of the
containers.podman
collection:Either git commit if installed from git:
git show --summary
Or version from
ansible-galaxy
if installed from galaxy:ansible-galaxy collection list | grep containers.podman
Output of
ansible --version
:Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Inventory file (e.g. content of
inv
):Playbook you run with ansible (e.g. content of
playbook.yaml
):Command line and output of ansible run with high verbosity
ansible-playbook -vvvvvvvv -i inv ./playbook.yml -t remote
Additional environment details (AWS, VirtualBox, physical, etc.):
The text was updated successfully, but these errors were encountered: