I believe I know the generic answer to your question from reading other 
posts:
  ~/.ssh/known_hosts must exist on the target machine for the user you are 
ssh as (also make sure you have the correct perms on this file and the .ssh 
directory)

The part that I would like to understand is WHY this file is required. If 
the ssh to the machine was successful and strict host key checking is off 
then what benefit is the file? This file will never exist on my freshly 
imaged machines and I'd rather not have to add a hack to create it for 
ansible. Any way to turn this off?



On Wednesday, December 23, 2015 at 8:51:31 AM UTC-6, Vikram Ranabhatt wrote:
>
> I am using ansible 1.9.3
>
>
> Manuall ssh to the machine some time work and some time not work.But 
> regardless of manuall ssh login...i am getting this error.
>
>
> PLAY [licproxy] ***********************************************************
>
>  
>
> GATHERING FACTS 
> ***************************************************************
>
> <10.32.1.40> ESTABLISH CONNECTION FOR USER: my-user
>
> <10.32.1.40> REMOTE_MODULE setup
>
> <10.32.1.40> EXEC ssh -C -tt -vvv -o StrictHostKeyChecking=no -o 
> IdentityFile="/opt/apps/installer/tenant-dev29/ssh/admin-key-vmsdev29" -o 
> KbdInteractiveAuthentication=no -o 
> PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey 
> -o PasswordAuthentication=no -o User=cloud-user -o ConnectTimeout=10 
> 10.32.1.40 /bin/sh -c 'mkdir -p 
> $HOME/.ansible/tmp/ansible-tmp-1450797442.33-90087292637238 && chmod a+rx 
> $HOME/.ansible/tmp/ansible-tmp-1450797442.33-90087292637238 && echo 
> $HOME/.ansible/tmp/ansible-tmp-1450797442.33-90087292637238'
>
> EXEC previous known host file not found for 10.32.1.40
>
> fatal: [10.32.1.40] => SSH Error: ssh: connect to host 10.32.1.40 port 22: 
> Connection refused
>
>     while connecting to 10.32.1.40:22
>
> It is sometimes useful to re-run the command using -vvvv, which prints SSH 
> debug output to help diagnose the issue.
>
>  
>
> TASK: [Install tinyproxy] 
> *****************************************************
>
> FATAL: no hosts matched or all hosts have already failed -- aborting
>
>
>
>
> .yml file
>
> ---
> - hosts: myproxy
>   user: cloud-user  
>   sudo: yes
>   tasks:
>
>   - name: Install tinyproxy
>     apt: name=tinyproxy state=present update_cache=yes
>
>   - name: Install bind9
>     apt: name=bind9 state=present update_cache=yes force=yes    
>
>
>

-- 
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/2ce4b2c3-c9c5-4e9a-b68d-8e538ac9c630%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to