# specifying ansible\_ssh\_pass in group vars makes playbook hang

**URL:** <https://forum.ansible.com/t/specifying-ansible-ssh-pass-in-group-vars-makes-playbook-hang/18248>\
**Category:** Ansible Project\
**Created:** [May 18, 2015, 8:50am UTC](https://forum.ansible.com/t/specifying-ansible-ssh-pass-in-group-vars-makes-playbook-hang/18248 "2015-05-18T08:50:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ritesh\_Shetty](https://avatars.discourse-cdn.com/v4/letter/r/839c29/32.png) [@Ritesh\_Shetty](https://forum.ansible.com/u/Ritesh_Shetty)\
**Post date:** [May 18, 2015, 8:50am UTC](https://forum.ansible.com/t/specifying-ansible-ssh-pass-in-group-vars-makes-playbook-hang/18248/1 "2015-05-18T08:50:51Z")

</div>

Hello !  
I am trying to run a playbook by specifying the inventory using dynamic inventory as given below

{  
“192.168.0.65”: {  
“hosts”: [  
“192.168.0.65”  
],  
“vars”: {  
“ansible\_connection”: “ssh”,  
**“ansible\_ssh\_pass”: “password”,**  
“ansible\_ssh\_port”: “22”,  
“ansible\_ssh\_user”: “root”  
}  
} “\_meta”: {  
“hostvars”: {  
“192.168.0.65”: {  
“hypervisor\_id\_list”: [  
“2”  
],  
“hypervisor\_type”: “kvm”,  
“password”: “password”,  
“port”: “22”,  
“username”: “root”  
}  
}  
}  
}

When i try to run the playbook it gets hung. I was hoping when i give the **ansible\_ssh\_pass** it would go ahead and run the playbook.

The console output looks like this

2015-05-18 08:39:11,060 - DEBUG - \<192.168.0.65\> EXEC sshpass **-d4** ssh -C -tt -vvv -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ServerAliveInterval=200 -o StrictHostKeyChecking=no -o Port=22 -o GSSAPIAuthentication=no -o PubkeyAuthentication=no -o ConnectTimeout=200 192.168.0.65 /bin/sh -c ‘mkdir -p $HOME/.ansible/tmp/ansible-tmp-1431938351.05-188972893253294 && echo $HOME/.ansible/tmp/ansible-tmp-1431938351.05-188972893253294’

Even though i am assuming in my case it is not needed , i even tried --ask-pass it prompts for pasword and then the same thing.

I have the sshpass on the machine where i am running playbook from and not on the remote machine

I am able to ssh using the username/password

Please advise !

---

<div class="post-metadata">

**Author:** ![Ritesh\_Shetty](https://avatars.discourse-cdn.com/v4/letter/r/839c29/32.png) [@Ritesh\_Shetty](https://forum.ansible.com/u/Ritesh_Shetty)\
**Post date:** [May 18, 2015, 9:10am UTC](https://forum.ansible.com/t/specifying-ansible-ssh-pass-in-group-vars-makes-playbook-hang/18248/2 "2015-05-18T09:10:54Z")

</div>

My Problem got solved when i used ansible\_connection as paramiko. The documentation says post 1.2 i can use “smart” but when i give that it doesnt recognise it.  
So the question is if i have to go with password v/s key then what ansible\_connection should i be using for both ?

---

<div class="post-metadata">

**Author:** ![benno\_joy](https://avatars.discourse-cdn.com/v4/letter/b/73ab20/32.png) [@benno\_joy](https://forum.ansible.com/u/benno_joy)\
**Post date:** [May 18, 2015, 9:21am UTC](https://forum.ansible.com/t/specifying-ansible-ssh-pass-in-group-vars-makes-playbook-hang/18248/3 "2015-05-18T09:21:09Z")

</div>

Hi Ritesh,

Both key and pasaword should work fine with both connection types (ssh, paramiko), since paramiko works fine, i would guess some ssh config might be causing the issue, can you change you connection type back to ssh and run the playbook -vvvv and attach an output, also the version of ansible you are using.

- Benno

---

<div class="post-metadata">

**Author:** ![Ritesh\_Shetty](https://avatars.discourse-cdn.com/v4/letter/r/839c29/32.png) [@Ritesh\_Shetty](https://forum.ansible.com/u/Ritesh_Shetty)\
**Post date:** [May 18, 2015, 9:46am UTC](https://forum.ansible.com/t/specifying-ansible-ssh-pass-in-group-vars-makes-playbook-hang/18248/4 "2015-05-18T09:46:41Z")

</div>

Hi Beno  
The output i sent is with vvvv and connection “ssh” caused it to hang

---

<div class="post-metadata">

**Author:** ![benno\_joy](https://avatars.discourse-cdn.com/v4/letter/b/73ab20/32.png) [@benno\_joy](https://forum.ansible.com/u/benno_joy)\
**Post date:** [May 18, 2015, 9:59am UTC](https://forum.ansible.com/t/specifying-ansible-ssh-pass-in-group-vars-makes-playbook-hang/18248/5 "2015-05-18T09:59:33Z")

</div>

have you set any values for “ssh\_args” in ansible.cfg or environment variable ‘ANSIBLE\_SSH\_ARGS’

can you set ‘export ANSIBLE\_SSH\_ARGS=" "’ and see if that helps.
