homeserver/roles/mgrote_munin_node/tasks/user.yml

23 lines
470 B
YAML
Raw Permalink Normal View History

---
- 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