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! => {
"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?