allow passwordless Sudo for user

This commit is contained in:
Raphael Dannecker 2026-01-21 12:01:15 +01:00
parent 7070e183ae
commit 3faf0525a8
4 changed files with 22 additions and 10 deletions

View file

@ -26,6 +26,15 @@
createhome: true
password: password
- name: Allow sudo without password for user
ansible.builtin.lineinfile:
path: /etc/sudoers.d/95-user
line: 'user ALL=(root) NOPASSWD: ALL'
create: true
owner: root
group: root
mode: '0700'
- name: Enable autologin for user
ansible.builtin.copy:
content: |