ansible/roles/users/tasks/main.yml
2021-04-11 16:06:07 +01:00

20 lines
No EOL
390 B
YAML

---
- name: Add user jonathan
user:
name: jonathan
comment: Jonathan Cremin
uid: 1000
groups: jonathan,wheel
shell: /bin/zsh
append: yes
become: yes
- name: Passwordless sudo for jonathan
lineinfile:
path: /etc/sudoers
state: present
regexp: '^%wheel'
line: '%wheel ALL=(ALL) NOPASSWD: ALL'
validate: /usr/sbin/visudo -cf %s
become: yes