ansible/roles/users/tasks/main.yml

20 lines
390 B
YAML
Raw Permalink Normal View History

2020-04-29 21:51:12 +01:00
---
- name: Add user jonathan
user:
name: jonathan
comment: Jonathan Cremin
uid: 1000
2021-04-11 16:00:07 +01:00
groups: jonathan,wheel
2020-04-29 21:51:12 +01:00
shell: /bin/zsh
append: yes
become: yes
- name: Passwordless sudo for jonathan
lineinfile:
path: /etc/sudoers
state: present
2021-04-11 16:00:07 +01:00
regexp: '^%wheel'
line: '%wheel ALL=(ALL) NOPASSWD: ALL'
2020-04-29 21:51:12 +01:00
validate: /usr/sbin/visudo -cf %s
become: yes