How to make sudo not ask for password – ubuntu

I’m just starting to use Ansible to automate the configuration of some of our servers. Therefore, I need to stop sudo asking for a password. You need to edit /etc/sudoers . However, you can’t do this with your usual text editor. You need to use visudo

sudo visudo

To add a your user add the following line:

username ALL=(ALL) NOPASSWD: ALL

Leave a Reply