-
Notifications
You must be signed in to change notification settings - Fork 23.8k
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
Cannot delegate_to with connection: docker #76778
Comments
does the host you delegate to already have |
No, but I have realized that maybe it is trying to connect to docker on my local machine where I run ansible instead of the docker on the remote host, and maybe that's my issue? Using a non-existent container name gives me the same error. |
the 'docker' connection plugin assumes the host running ansible contains the docker instances |
@bcoca Yeah, ok, it seems that's the problem. Not a very clear error message when the problem is "container not found" ... |
The error is correct, the plugin does not handle remotes. In most cases this should reflect that the container is down/does not exist/is misspelled, not that it is running on the wrong host. In any case, that plugin does not reside in this repo anymore https://github.com/ansible-collections/community.docker/issues |
Sure, just that "cannot create temporary directory" does not really indicate to me that the container is not found. In any case, you're right that this is the wrong repo anyway. Sorry about that. |
Summary
Trying to use delegate_to with
connection: docker
produces an error. Removing the delegate_to it works fine.Issue Type
Bug Report
Component Name
delegate_to
Ansible Version
Configuration
$ ansible-config dump --only-changed
OS / Environment
Steps to Reproduce
Expected Results
It should run a command inside a container.
Actual Results
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-1642452724.8971472-123454-5127813474037 `\" && echo ansible-tmp-1642452724.8971472-123454-5127813474037=\"` echo ~/.ansible/tmp/ansible-tmp-1642452724.8971472-123454-5127813474037 `\" ), exited with result 1", "unreachable": true}
Code of Conduct
The text was updated successfully, but these errors were encountered: