Hi all, I want to manage a machine running openwrt with ansible. First I got stuck just connecting to the machine, and I do not find the error:
> ansible -m setup 192.168.11.1
> 192.168.11.1 | 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
> }
I can ssh into the machine without errors with my ssh key loaded into
ssh-agent.
I tried to ansible to the IP, to the FQDN and to the short hostname.
No change, but each works with ssh (.ssh/config contains entries for
IP, hostname and FQDN).
I added ansible_port and ansible_user to the host_vars file for this
machine.
I installed python on the machine.
I tried paramiko but got no further than a sftp error.
I deleted all lines for this host from my ~/.ssh/config file, but
still unreachable.
Using ansible -vvvv shows lots of output, shows that remote port and
user are configured but otherwise no
> ansible -vvvv -m setup 192.168.11.1
> Using /Users/XYZ/.ansible.cfg as config file
> Loaded callback minimal of type stdout, v2.0
> <192.168.11.1> ESTABLISH SSH CONNECTION FOR USER: XYZ_remote_user
> <192.168.11.1> SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o
> ControlPersist=60s -o Port=22 -o KbdInteractiveAuthentication=no -o
> PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o
> PasswordAuthentication=no -o User=XYZ_remote_user -o ConnectTimeout=10 -o
> ControlPath=/Users/XYZ/.ansible/cp/ansible-ssh-%h-%p-%r -tt 192.168.11.1
> '/bin/sh -c '"'"'( umask 22 && mkdir -p "` echo
> $HOME/.ansible/tmp/ansible-tmp-1457003393.13-114556537372930 `" && echo "`
> echo $HOME/.ansible/tmp/ansible-tmp-1457003393.13-114556537372930 `" )'"'"''
> <192.168.11.1> PUT /var/folders/p7/9skq460x09qb37swmbc4thww0000z8/T/tmpr80zDZ
> TO
> /home/XYZ_remote_user/.ansible/tmp/ansible-tmp-1457003393.13-114556537372930/setup
> <192.168.11.1> SSH: EXEC sftp -b - -C -vvv -o ControlMaster=auto -o
> ControlPersist=60s -o Port=22 -o KbdInteractiveAuthentication=no -o
> PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o
> PasswordAuthentication=no -o User=XYZ_remote_user -o ConnectTimeout=10 -o
> ControlPath=/Users/XYZ/.ansible/cp/ansible-ssh-%h-%p-%r '[192.168.11.1]'
> 192.168.11.1 | 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
> }
########################
Funny enough, using the raw module to call date kinda works:
> ansible -v -m raw -a date 192.168.11.1
> Using /Users/XYZ/.ansible.cfg as config file
> 192.168.11.1 | SUCCESS | rc=0 >>
> shell-init: error retrieving current directory: getcwd: cannot access parent
> directories: Success
> Thu Mar 3 12:17:21 CET 2016
I do not know where the shell-init error is from, as both bash and
python seem to be in standard places:
/bin/bash
/usr/bin/python
Any hints are highly appreciated.
Johannes
--
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/56D81EA5.8080505%40ojkastl.de.
For more options, visit https://groups.google.com/d/optout.
signature.asc
Description: OpenPGP digital signature
