Passwordless Sudo with Ansible
Sudo without password, automatically. Short example role for ansible.
The role
- creates a new user in "sudoless" group
- adds a sudoers.d/ NOPASSWD rule for the group
Sudo without password, automatically. Short example role for ansible.
The role
Ansible needs root on the slave. One way is to allow 'sudo' without password.
Summary for gurus (the rest of us can read the article):
$ cat /etc/sudoers.d/sudoless
%sudoless ALL = (ALL) NOPASSWD: ALL

Learn to manage your own Linux server – in 8 weeks.
100% remote. Weekly video conference + a lot of individual work. Beginners welcome. Excellent feedback. In Finnish.