On 19. juli 2016 18:11, Jörg Kastning wrote:
<host1.example.com> ESTABLISH SSH CONNECTION FOR USER: None
<host1.example.com> SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o
ControlPersist=60s -o KbdInteractiveAuthentication=no -o
PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o
PasswordAuthentication=no -o ConnectTimeout=10 -o
ControlPath=/root/.ansible/cp/ansible-ssh-%h-%p-%r host1.example.com
'/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo
$HOME/.ansible/tmp/ansible-tmp-1468943476.87-148558126071189 `" && echo
ansible-tmp-1468943476.87-148558126071189="` echo
$HOME/.ansible/tmp/ansible-tmp-1468943476.87-148558126071189 `" ) &&
sleep 0'"'"''
Here Ansible is doing the ssh and setting up the run.
Since it doesn't fail here, the ssh is working.
<host1.example.com> PUT /tmp/tmpO6LVmh TO
/root/.ansible/tmp/ansible-tmp-1468943476.87-148558126071189/ping
<host1.example.com> SSH: EXEC sftp -b - -C -vvv -o ControlMaster=auto -o
ControlPersist=60s -o KbdInteractiveAuthentication=no -o
PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o
PasswordAuthentication=no -o ConnectTimeout=10 -o
ControlPath=/root/.ansible/cp/ansible-ssh-%h-%p-%r '[host1.example.com]'
host1.example.com | UNREACHABLE! => {
"changed": false,
"msg": "SSH Error: data could not be sent to the remote host. Make
sure this host can be reached over ssh",
"unreachable": true
}
But when Ansible tries to copy over the files it need to run the ping
command it fails, so something is denying sftp to host1.
You could check that ssh is working with the raw module like this:
ansible test1.example.com -m raw -a "hostname"
I'm somewhat curious about the following line:
ESTABLISH SSH CONNECTION FOR USER: None
I guess this means that no user is set in Ansible, and that the logged
in user is being used.
I would expect ansible to establish a connection for root. Shouldn't
that be the default behaviour?
The default behavior is the user you are logged in as.
--
Kai Stian Olstad
--
You received this message because you are subscribed to the Google Groups "Ansible
Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/578E69AC.4090004%40olstad.com.
For more options, visit https://groups.google.com/d/optout.