Ansible-playbook

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.

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

V/r,
James Cassell