title: Ansible: To use the 'ssh' connection type with passwords, you must install the sshpass program"
body: <p>Recently I created new roles called spd in my existing project. While other script works fine in the setup. This newly created fails. Please point me to what is going wrong here</p>
  <pre><code>ansible/roles
        spd
          tasks
          templates
          defaults
  </code></pre>
  <p><strong>deploy-spd.yml</strong></p>
  <pre><code> - hosts:
     roles:
       - spd
  </code></pre>
  <p><strong>inventory file</strong></p>
  <pre><code>[kube-master]
  kubernetes-master-1 ansible_host=10.20.0.225 ansible_user=centos ansible_become=true
  kubernetes-master-2 ansible_host=10.20.0.226 ansible_user=centos ansible_become=true
  kubernetes-master-3 ansible_host=10.20.0.227 ansible_user=centos ansible_become=true
  </code></pre>
  <p><strong>Failure</strong></p>
  <pre><code>bash-4.3# ansible-playbook -i inventory/inventory deploy-test-ms.yml --ask-vault-pass
  Vault password:
  
  PLAY [kube-master] *************************************************************
  
  TASK [setup] *******************************************************************
  Thursday 16 March 2017  13:32:05 +0000 (0:00:00.026)       0:00:00.026 ********
  fatal: [kubernetes-master-1]: FAILED! =&gt; {&quot;failed&quot;: true, &quot;msg&quot;: &quot;to use the 'ssh' connection type with passwords, you must install the sshpass program&quot;}
  fatal: [kubernetes-master-2]: FAILED! =&gt; {&quot;failed&quot;: true, &quot;msg&quot;: &quot;to use the 'ssh' connection type with passwords, you must install the sshpass program&quot;}
  fatal: [kubernetes-master-3]: FAILED! =&gt; {&quot;failed&quot;: true, &quot;msg&quot;: &quot;to use the 'ssh' connection type with passwords, you must install the sshpass program&quot;}
  
  PLAY RECAP *********************************************************************
  kubernetes-master-1 : ok=0    changed=0    unreachable=0    failed=1
  kubernetes-master-2 : ok=0    changed=0    unreachable=0    failed=1
  kubernetes-master-3 : ok=0    changed=0    unreachable=0    failed=1
  </code></pre>
  <p><strong>UPDATE:</strong></p>
  <pre><code>**With failed script**    
  
          Using module file /usr/lib/python2.7/site-packages/ansible/modules/core/system/setup.py
  &lt;10.20.0.227&gt; ESTABLISH SSH CONNECTION FOR USER: centos
  Using module file /usr/lib/python2.7/site-packages/ansible/modules/core/system/setup.py
  Using module file /usr/lib/python2.7/site-packages/ansible/modules/core/system/setup.py
  Using module file /usr/lib/python2.7/site-packages/ansible/modules/core/system/setup.py
  &lt;172.23.169.137&gt; ESTABLISH SSH CONNECTION FOR USER: centos
  &lt;10.20.0.225&gt; ESTABLISH SSH CONNECTION FOR USER: centos
  &lt;10.20.0.226&gt; ESTABLISH SSH CONNECTION FOR USER: centos
     
  **With successfull script**    
  
  Thursday 16 March 2017  14:03:49 +0000 (0:00:00.066)       0:00:00.066 ********
  Using module file /usr/lib/python2.7/site-packages/ansible/modules/core/system/setup.py
  &lt;10.20.0.237&gt; ESTABLISH SSH CONNECTION FOR USER: centos
  &lt;10.20.0.237&gt; SSH: EXEC ssh -F ./ssh.cfg -o ControlMaster=auto -o ControlPersist=30m -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey
  -o PasswordAuthentication=no -o User=centos -o ConnectTimeout=30 -o 'ControlPath=~/.ssh/ansible-%r@%h:%p' 10.20.0.237 '/bin/sh -c '&quot;'&quot;'( umask 77 &amp;&amp; mkdir -p &quot;` echo $HOME/.ansible/tmp/ansible-tmp-1489673029.48-15997231643297
  4 `&quot; &amp;&amp; echo ansible-tmp-1489673029.48-159972316432974=&quot;` echo $HOME/.ansible/tmp/ansible-tmp-1489673029.48-159972316432974 `&quot; ) &amp;&amp; sleep 0'&quot;'&quot;''
  &lt;10.20.0.237&gt; PUT /tmp/tmpnHJPbc TO /home/centos/.ansible/tmp/ansible-tmp-1489673029.48-159972316432974/setup.py
  &lt;10.20.0.237&gt; SSH: EXEC scp -F ./ssh.cfg -o ControlMaster=auto -o ControlPersist=30m -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey
  -o PasswordAuthentication=no -o User=centos -o ConnectTimeout=30 -o 'ControlPath=~/.ssh/ansible-%r@%h:%p' /tmp/tmpnHJPbc '[10.20.0.237]:/home/centos/.ansible/tmp/ansible-tmp-1489673029.48-159972316432974/setup.py'
  &lt;10.20.0.237&gt; ESTABLISH SSH CONNECTION FOR USER: centos
  &lt;10.20.0.237&gt; SSH: EXEC ssh -F ./ssh.cfg -o ControlMaster=auto -o ControlPersist=30m -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey
  -o PasswordAuthentication=no -o User=centos -o ConnectTimeout=30 -o 'ControlPath=~/.ssh/ansible-%r@%h:%p' 10.20.0.237 '/bin/sh -c '&quot;'&quot;'chmod u+x /home/centos/.ansible/tmp/ansible-tmp-1489673029.48-159972316432974/ /home/cento
  s/.ansible/tmp/ansible-tmp-1489673029.48-159972316432974/setup.py &amp;&amp; sleep 0'&quot;'&quot;''
  </code></pre>