title: how to specify user name in host file of ansible
body: <p>I am using the host file as below,</p>
  
  <pre><code>[qa-workstations]
  10.39.19.190 ansible_user=test ansible_ssh_pass=test
  </code></pre>
  
  <p>I am using below command to execute "whoami" command in host</p>
  
  <pre><code>root@Svr:~/ansible# ansible all -a "whoami" -i /etc/ansible/host
  10.39.19.190 | success | rc=0 &gt;&gt;
  root
  </code></pre>
  
  <p>ansible by default trying to use user name in which I have logged in, i.e root instead of test user which I have specified in host file</p>
  
  <p>It works fine when I try to pass the username in ansible cli command</p>
  
  <pre><code>root@Svr:~/ansible# ansible all -a "whoami" -i /etc/ansible/host -u test
  10.39.19.190 | success | rc=0 &gt;&gt;
  test
  </code></pre>
  
  <p>But its not possible for me to pass username every time in CLI as different host uses different username. Also I don't have a key pair generated for each host, because host machine keeps changing often </p>
  
  <p>version used: </p>
  
  <pre><code> ansible 1.5.4 
   Ubuntu 14.04 LTS
  </code></pre>