Waiting for privilege escalation prompt I'm new with Ansible so hope to find answers here.
I'm trying to run some playbook but getting an error:

fatal: [10.65.30.117]: FAILED! =&gt; {
  "msg": "Timeout (12s) waiting for privilege escalation prompt: "
}


Here are the steps which I performed:


I installed Ansible 2.6.17 on RHEL 6.8 using root user.
I update /etc/ansible/host with new group of IPs (with root user)
I created playbook file (with some other user) with the following content:


  name: sample_playbook
  hosts: [ansible_clients]
  remote_user: ronenal
  become: true
  tasks:
     - name: create file
       file:
         path: /tmp/ansible.log
         state: touch
         mode: u=rw,g=r,o=r


When I execute ansible-playbook -sample_playbook.yml I'm getting the above error.

I set ANSIBLE_DEBUG=1 and it looks like it related to sudo command.
The user which I use is not in the sudoers list.

My questions:


Is it required to be a privileged user in order to execute Ansible playbook?
if no, what am I doing wrong?
if yes, is that mean that I need to add this user to the sudoers users list?
You don't need to be a privileged user (in your local machine) in order to execute Ansible playbook.
When using become, Ansible allows you to ‘become’ another user, different from the user that logged into the machine (remote user).
For more details see Understanding Privilege Escalation
In your inventory of hosts /etc/ansible/host you have specified a group of IPs with root user while you are specifying a remote_user: ronenal in your playbook.
So you need to run ansible-playbook with --ask-become-pass or -K.