With fresh eyes on the problem today, the last response in the GitHub issue clicked for me. I was defining "user@ip" in my ansible hosts file, instead of declaring the user with the `--user=` flag in the playbook command. Solved my own problem, hopefully this helps someone else.
On Tuesday, August 23, 2016 at 8:22:05 PM UTC-4, jguil...@g.harvard.edu wrote: > > Hi there, > > I'm new to Ansible, and jumping into it for a project at work. Right now > I'm trying to update our AWS instance machine using ansible-playbook. More > specifically, I'm running > ansible-playbook --private-key ~/keys/OasSDev.pem --sudo linux-toolbox.yml > -vvv > > > What I'm getting is that this (with IP edited out): > > ansible-playbook --private-key ~/path/to/key.pem linux-toolbox.yml -vvv > > > No config file found; using defaults > [DEPRECATION WARNING]: Instead of sudo/sudo_user, use become/become_user > and make sure > become_method is 'sudo' (default). > This feature will be removed in a future release. > Deprecation warnings can be disabled by setting deprecation_warnings=False > in ansible.cfg. > Loaded callback default of type stdout, v2.0 > > > PLAYBOOK: linux-toolbox.yml > **************************************************** > 1 plays in linux-toolbox.yml > > > PLAY [linux-toolbox] > *********************************************************** > > > TASK [setup] > ******************************************************************* > <ubu...@my.ip.goes.here> ESTABLISH SSH CONNECTION FOR USER: ubuntu > <ubu...@my.ip.goes.here> SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o > ControlPersist=60s -o 'IdentityFile="/Users/jguillette/keys/OasSDev.pem"' > -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with > -mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User > =ubuntu -o ConnectTimeout=10 -o ControlPath=/Users/jguillette/.ansible/cp/ > ansible-ssh-%h-%p-%r ubu...@my.ip.goes.here '/bin/sh -c '"'"'( umask 77 > && mkdir -p "` echo > $HOME/.ansible/tmp/ansible-tmp-1471991079.97-57666739369328 `" && echo > ansible-tmp-1471991079.97-57666739369328="` echo > $HOME/.ansible/tmp/ansible-tmp-1471991079.97-57666739369328 `" ) && sleep > 0'"'"'' > <ubu...@my.ip.goes.here> PUT /var/folders/k8/ > g7tw63ps1xx8dl39rs6p6nfh91wzbh/T/tmpgow_gt TO /home/ubuntu/.ansible/tmp/ > ansible-tmp-1471991079.97-57666739369328/setup > <ubu...@my.ip.goes.here> SSH: EXEC sftp -b - -C -vvv -o ControlMaster=auto > -o ControlPersist=60s -o > 'IdentityFile="/Users/jguillette/keys/OasSDev.pem"' -o > KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with- > mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o > User=ubuntu > -o ConnectTimeout=10 -o ControlPath=/Users/jguillette/.ansible/cp/ansible- > ssh-%h-%p-%r '[ubu...@my.ip.goes.here]' > fatal: [ubu...@my.ip.goes.here]: 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} > [WARNING]: Could not create retry file 'linux-toolbox.retry'. [ > Errno 2] No such file > or directory: '' > > > > > PLAY RECAP > ********************************************************************* > ubu...@my.ip.goes.here : ok=0 changed=0 unreachable=1 > failed=0 > > I'm able to ssh into the remote machine, and I'm able to connect with sftp > via this command: > > sftp -vvv -o ControlMaster=auto -o ControlPersist=60s -o > 'IdentityFile="/Users/jguillette/keys/OasSDev.pem"' -o > KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with- > mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o > User=ubuntu > -o ConnectTimeout=10 -o ControlPath=/Users/jguillette/.ansible/cp/ansible- > ssh-%h-%p-%r 'ubu...@my.ip.goes.here' > > > Original for comparison, removed the flags -b - -C and the brackets around > the user@ip: > sftp -b - -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o > 'IdentityFile="/Users/jguillette/keys/OasSDev.pem"' -o > KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with- > mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o > User=ubuntu > -o ConnectTimeout=10 -o ControlPath=/Users/jguillette/.ansible/cp/ansible- > ssh-%h-%p-%r '[ubu...@my.ip.goes.here]' > > I'm not sure if I need to make some edits to my local Ansible > configuration, or if there are some issues on the remote. I found an issue > on GitHub <https://github.com/ansible/ansible/issues/16066> that sounds > like what I'm seeing, but I haven't been able to turn that into a working > solution. I did look at /etc/ssh/sshd_config and didn't find anything > related to sftp. That seems like a problem, but I also haven't done sftp > setup before, so I don't know for sure. > > Any help or insight would be greatly appreciated. > > -- 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 ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/2f7cffec-c2fa-4008-b062-eee558825f4d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.