title: Not able to run ansible playbook in ec2(host machine) to Mac(target machine)
body: <p>My mac machine is communicating with an ec2 instance, SSH connection is established and when it's pinged ,I am getting a response as "pong", but when I run playbook facing below issue.</p>
  
  <p>but when I run playbook getting below error:</p>
  
  <pre><code>PLAY [macserver] ***************************************************************
  
  TASK [Gathering Facts] *********************************************************
  fatal: [X.X.X.X]: FAILED! =&gt; {"msg": "Missing sudo password"}
  
  PLAY RECAP *********************************************************************
  X.X.X.X : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
  </code></pre>
  
  <p>running the playbook as ec2-user, also just to check if issue is with ec2-user added new user as "ansible" in my linux ec2 instance and started running playbook, but still same issue is persisting.
  Also I have added ec2-user in sudoers file.</p>
  
  <p>I tried alternative method to run playbook as specified below: </p>
  
  <p><code>"ansible-playbook paybook.yml -k -K"</code></p>
  
  <p>command to give password and run playbook,
  in that scenario facing incorrect sudo password error. Whereas the password created for root, ec2-user and ansible all are same. 
  I am not able to figure out what and where I am missing, Can anyone help me with this?</p>