Please show the output from that first task as it's trying to connect with "-vvvv" on the command line, and also the SSH debug from the other so we can see what ports it is trying to talk to there, etc.
It also doesn't matter here I'm guessing, but it's always useful to indicate your ansible version when asking a question. Your host OS also matters, "-c ssh" will read your SSH config, paramiko will not. Thanks! On Thu, May 15, 2014 at 5:57 AM, Ian Kent <ianken...@gmail.com> wrote: > Hi > > I'm having some issues getting ansible to connect using SSH, but it only > seems to affect one particular playbook. The odd thing is I can connect > manually using ssh, but ansible fails with a timed out error. Other > playbooks/hosts work absolutely fine with exactly the same config. > > Here's the output I get - a lot less than I'd normally expect for a > failure (no ssh debug output etc): > > -----@localhost:~/github/--------/ansible$ ansible-playbook -i hosts > playbook.yml -vvvv > > PLAY [all] > ******************************************************************** > > GATHERING FACTS > *************************************************************** > <ec2--------------.eu-west-1.compute.amazonaws.com> ESTABLISH CONNECTION > FOR USER: ec2-user on PORT 22 TO ec2--------------.eu-west-1.compute. > amazonaws.com > fatal: [ec2--------------.eu-west-1.compute.amazonaws.com] => {'msg': 'FAILED: > timed out', 'failed': True} > > TASK: [common | install wget] > ************************************************* > FATAL: no hosts matched or all hosts have already failed -- aborting > > PLAY RECAP > ******************************************************************** > to retry, use: --limit @/home/-------/playbook.retry > > > ec2--------------.eu-west-1.compute.amazonaws.com : ok=0 changed=0 > unreachable=1 failed=0 > > But it works fine using ssh directly: > > -------@localhost:~/github/---------/ansible$ ssh ec2-user@ec2 > --------------.eu-west-1.compute.amazonaws.com > > Last login: Thu May 15 05:15:13 2014 from ---.--.--.-- > [ec2-user@ip-------------- ~]$ exit > logout > Connection to ec2--------------.eu-west-1.compute.amazonaws.com closed. > > SSH config is set to use corkscrew to proxy over http, which works fine on > other playbooks/sites and from command line: > KeepAlive yes > ServerAliveInterval 60 > > Host *.compute.amazonaws.com > IdentityFile ~/.ssh/-----------.pem > ProxyCommand /usr/bin/corkscrew -------.--------- 8080 %h %p > StrictHostKeyChecking no > > Tried all the usual stuff, swapping hosts between working/failing > playbooks, rebooting, etc - out of ideas! > > Any suggestions? > > Thanks > Ian > > -- > 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/f8640bf7-8b21-4633-8d0a-11261c33879d%40googlegroups.com<https://groups.google.com/d/msgid/ansible-project/f8640bf7-8b21-4633-8d0a-11261c33879d%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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/CA%2BnsWgyfCkz6Ox-JR%2BXiLiADFie4B-9uWc4hMzUzt2GJPC8sfA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.