title: Ansible: "sudo: a password is required\r\n"
body: <p>quick question</p>
  
  <p>I have setup an Ubuntu server with a user named test. I copy the authorized_keys to it, I can ssh no problem.
  If I do <b>$ ansible -m ping ubu1</b>, no problem  I get a response</p>
  
  <pre><code>    &lt;i&gt;&lt;p&gt;ubu1 | SUCCESS =&gt; {
          &lt;br&gt;"changed": false, 
          &lt;br&gt;"ping": "pong"
      &lt;br&gt;}&lt;/i&gt;
  </code></pre>
  
  <p>What I dont get is this, If I do</p>
  
  <p><b>$ ansible-playbook -vvvv Playbooks/htopInstall.yml</b> </p>
  
  <pre><code>fatal: [ubu1]: FAILED! =&gt; {"changed": false, "failed": true, "invocation": {"module_name": "setup"}, "module_stderr": "OpenSSH_7.2p2 Ubuntu-4ubuntu2.1, OpenSSL 1.0.2g-fips  1 Mar 2016\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 6109\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 1\r\nShared connection to 192.168.1.112 closed.\r\n", "module_stdout": "sudo: a password is required\r\n", "msg": "MODULE FAILURE", "parsed": false}
  </code></pre>
  
  <p>If I do <b>$ ansible-playbook --ask-sudo-pass Playbooks/htopInstall.yml</b>, then it ask my user password and the play is a success.</p>
  
  <p>If I rename the authorized_keys it tells me I "Failed to connect to the host via ssh." which is ok.
  What I dont understand is why is it asking for a sudo password. I definetly missed something along the way.</p>
  
  <p>my <b>ansible.cfg</b> file looks like this</p>
  
  <pre><code>[defaults]
  nocows = 1
  inventory = ./Playbooks/hosts
  remote_user = test
  private_key_file = /home/test/.ssh/id_ubu
  host_key_checking = false
  </code></pre>
  
  <p>my hosts file looks like this</p>
  
  <pre><code>[servers]
  ubu1 ansible_ssh_host=192.168.1.112 ansible_ssh_user=test
  </code></pre>