Added sudo for real

This commit is contained in:
2021-10-18 14:24:58 +02:00
parent 2bd8139ec7
commit c88c0e7ce0

View File

@@ -17,14 +17,16 @@
name: sudo
state: present
- name: Ensure group "sudo" exists
ansible.builtin.group:
name: sudo
- name: Allow 'tobi' user to have sudo
lineinfile:
dest: /etc/sudoers
state: present
regexp: '^%tobi'
line: '%tobi ALL=(ALL) NOPASSWD: ALL'
validate: 'visudo -cf %s'
- name: Add the user tobi
ansible.builtin.user:
name: tobi
password: $6$9OnvBMN6Sxc.muW1$afASAJdoPZL/WxTp6.lh/SurRRiClaru2Pl19fEo6j1aDEQw99kdkfls6.DB8OBacBDnT3bpsLYD3JqrvXlE9/
comment: Tobias Maier
group: sudo