Skip to content
This repository has been archived by the owner on Feb 5, 2024. It is now read-only.

Ansible claims host unreachable #21

Open
ToontjeM opened this issue Jul 5, 2023 · 2 comments
Open

Ansible claims host unreachable #21

ToontjeM opened this issue Jul 5, 2023 · 2 comments

Comments

@ToontjeM
Copy link

ToontjeM commented Jul 5, 2023

fatal: [myhost.ddns.net]: 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-1688551497.6347756-639-138421171919574 " && echo ansible-tmp-1688551497.6347756-639-138421171919574=" echo ~/.ansible/tmp/ansible-tmp-1688551497.6347756-639-138421171919574 " ), exited with result 1' unreachable: true
I created a host on ddns.net called myhost.ddns.net
added this host to inventory/hosts as
[matrix_servers] myhost.ddns.net ansible_host=myinternalIP ansible_ssh_user=myuser ansible_connection=community.docker.nsenter
Forwarded SSH on the firewall to redirect to myinternalIP. Tried with myexternalIP and myddnshostname as well).
SSH from outside to the ddns host gives me a proper response:
√ [centos7] ~ ssh [email protected] The authenticity of host 'myhost.ddns.net (myexternalIP)' can't be established. ECDSA key fingerprint is SHA256:G1j99whatever. ECDSA key fingerprint is MD5:48:35:7e:whatever Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'myhos.ddns.net,myexternalIP' (ECDSA) to the list of known hosts. [email protected]'s password: Welcome to Ubuntu 22.04.2 LTS (GNU/Linux 5.15.0-75-generic x86_64)

Also from inside the container i can ping myhost.ddns.net and responds with the correct external IP address.

What am i doing wrong here?

@ToontjeM
Copy link
Author

This is not the issue. As you can see in the log, there is clearly a message “Failed to create directory”

@SuperS123
Copy link

SuperS123 commented Jul 25, 2023

This is not the issue. As you can see in the log, there is clearly a message “Failed to create directory”

Misread, #22 (comment). Doing this will run the container in a privileged mode that'll allow it to do the directory stuff

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants