maybe this time?
This commit is contained in:
17
playbook.yml
17
playbook.yml
@@ -17,16 +17,21 @@
|
|||||||
name: sudo
|
name: sudo
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: Allow 'tobi' user to have sudo
|
- name: Make sure we have a 'wheel' group
|
||||||
|
group:
|
||||||
|
name: wheel
|
||||||
|
state=present
|
||||||
|
|
||||||
|
- name: Allow 'wheel' group to have passwordless sudo
|
||||||
lineinfile:
|
lineinfile:
|
||||||
dest: /etc/sudoers
|
dest=/etc/sudoers
|
||||||
state: present
|
state: present
|
||||||
regexp: '^%tobi'
|
regexp='^%wheel'
|
||||||
line: '%tobi ALL=(ALL) NOPASSWD: ALL'
|
line: '%wheel ALL=(ALL) NOPASSWD: ALL'
|
||||||
validate: 'visudo -cf %s'
|
|
||||||
|
|
||||||
- name: Add the user tobi
|
- name: Add the user tobi
|
||||||
ansible.builtin.user:
|
ansible.builtin.user:
|
||||||
name: tobi
|
name: tobi
|
||||||
password: $6$9OnvBMN6Sxc.muW1$afASAJdoPZL/WxTp6.lh/SurRRiClaru2Pl19fEo6j1aDEQw99kdkfls6.DB8OBacBDnT3bpsLYD3JqrvXlE9/
|
password: $6$9OnvBMN6Sxc.muW1$afASAJdoPZL/WxTp6.lh/SurRRiClaru2Pl19fEo6j1aDEQw99kdkfls6.DB8OBacBDnT3bpsLYD3JqrvXlE9/
|
||||||
comment: Tobias Maier
|
comment: Tobias Maier
|
||||||
|
groups: wheel
|
||||||
|
|||||||
Reference in New Issue
Block a user