title: Why is Ansible asking me to install the sshpass program when I've specified an ssh connection and key?
body: <p>I've got this in my inventory:</p>
  <pre><code>ansible_user=&lt;user&gt;
  ansible_connection=ssh
  ansible_ssh_private_key_file=&lt;location of key&gt;
  </code></pre>
  <p>and I can ssh in with that user and key.</p>
  <p>However, when I run the playbook I get:</p>
  <pre><code>{&quot;msg&quot;: &quot;to use the 'ssh' connection type with passwords, you must install the sshpass program&quot;}
  </code></pre>
  <p>FWIW,</p>
  <pre><code>Host OS: VERSION=&quot;20.04.1 LTS (Focal Fossa)&quot;
  ansible 2.9.9
  </code></pre>
  <p>Any suggestions how I can get Ansible to use the ssh key?</p>
  <p>UPDATE</p>
  <p>Here's what I get with <code>-vvvvv</code>:</p>
  <pre><code>ansible-playbook 2.9.9
    config file = /path/to/ansible.cfg
    configured module search path = ['/home/user/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
    ansible python module location = /home/user/.local/lib/python3.8/site-packages/ansible
    executable location = /home/user/.local/bin/ansible-playbook
    python version = 3.8.5 (default, Jul 28 2020, 12:59:40) [GCC 9.3.0]
  Using /path/to/ansible.cfg as config file
  Reading vault password file: /path/to/ansible-vault.txt
  setting up inventory plugins
  host_list declined parsing /path/to/inventory/inventory.win.aws as it did not pass its verify_file() method
  script declined parsing /path/to/inventory/inventory.win.aws as it did not pass its verify_file() method
  auto declined parsing /path/to/inventory/inventory.win.aws as it did not pass its verify_file() method
  yaml declined parsing /path/to/inventory/inventory.win.aws as it did not pass its verify_file() method
  Parsed /path/to/inventory/inventory.win.aws inventory source with ini plugin
  Loading callback plugin default of type stdout, v2.0 from /home/user/.local/lib/python3.8/site-packages/ansible/plugins/callback/default.py
  
  PLAYBOOK: playbook.yml ******************************************************************************
  Positional arguments: playbook.yml
  verbosity: 5
  connection: smart
  timeout: 10
  become_method: sudo
  inventory: ('/path/to/inventory',)
  vault_password_files: ('/path/to/ansible-vault.txt',)
  forks: 5
  1 plays in playbook.yml
  
  PLAY [all] ******************************************************************************************
  
  TASK [Gathering Facts] ******************************************************************************
  task path: /path/to/playbook.yml:2
  &lt;ip.address&gt; ESTABLISH SSH CONNECTION FOR USER: some_user
  fatal: [ip.address]: FAILED! =&gt; {
      &quot;msg&quot;: &quot;to use the 'ssh' connection type with passwords, you must install the sshpass program&quot;
  }
  
  PLAY RECAP ******************************************************************************************
  ip.address               : ok=0    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0   
  </code></pre>