homeserver/roles/mgrote_munin_node/tasks/user.yml
Michael Grote 506fa8da8d
All checks were successful
ansible-lint / gitleaks (push) Successful in 3s
ansible-lint / Ansible Lint (push) Successful in 34s
replace sudoers tasks with module (users, sanoid, munin) (#217)
Reviewed-on: #217
Co-authored-by: Michael Grote <michael.grote@posteo.de>
Co-committed-by: Michael Grote <michael.grote@posteo.de>
2024-10-23 20:16:30 +02:00

22 lines
470 B
YAML

---
- name: Ensure group exists
become: true
ansible.builtin.group:
name: "{{ munin_user_group }}"
state: present
- name: Ensure user exists
become: true
ansible.builtin.user:
name: munin
group: "{{ munin_user_group }}"
shell: /usr/sbin/nologin
create_home: false
- name: Ensure user is added to sudoers
community.general.sudoers:
name: "users-sudo-munin"
state: present
user: munin
commands: ALL
nopassword: true