# Ansible-playbook

**URL:** <https://forum.ansible.com/t/ansible-playbook/32728>\
**Category:** Ansible Project\
**Created:** [April 18, 2020, 10:13pm UTC](https://forum.ansible.com/t/ansible-playbook/32728 "2020-04-18T22:13:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Orkhan\_Mammadov](https://avatars.discourse-cdn.com/v4/letter/o/eada6e/32.png) [@Orkhan\_Mammadov](https://forum.ansible.com/u/Orkhan_Mammadov)\
**Post date:** [April 18, 2020, 10:13pm UTC](https://forum.ansible.com/t/ansible-playbook/32728/1 "2020-04-18T22:13:21Z")

</div>

Hi guys,

I have created file under /etc/sudoers.d/ directory with this entry: ansible ALL=(ALL) NOPASSWD:ALL and copied to managed hosts in order to install some service such as vsftpd on those hosts.

I can ssh and install any service with root user, but not with ansible user. It gives the following error while installing service via ansible-playbook command:

TASK [install vsftpd] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
fatal: [ansible1]: FAILED! =\> {“changed”: false, “msg”: “This command has to be run under the root user.”, “results”: }

Can you please tell me which configs should be made in order to install services on ansible user?

Thanks.

---

<div class="post-metadata">

**Author:** ![cassell](https://avatars.discourse-cdn.com/v4/letter/c/ecae2f/32.png) [@cassell](https://forum.ansible.com/u/cassell)\
**Post date:** [April 19, 2020, 12:04am UTC](https://forum.ansible.com/t/ansible-playbook/32728/2 "2020-04-19T00:04:08Z")

</div>

Pass `-b` to your ansible command or add `become: yes` to your playbook.

V/r,  
James Cassell
