homeserver/roles/mgrote_munin_node/tasks/user.yml
Michael Grote 32fe00c0b6 monitoring: add munin again... (#790)
Reviewed-on: #790
Co-authored-by: Michael Grote <michael.grote@posteo.de>
Co-committed-by: Michael Grote <michael.grote@posteo.de>

munin: nacharbeiten (#791)

Reviewed-on: #791
Co-authored-by: Michael Grote <michael.grote@posteo.de>
Co-committed-by: Michael Grote <michael.grote@posteo.de>

munin: remove playbook fixed (#792)

Reviewed-on: #792
Co-authored-by: Michael Grote <michael.grote@posteo.de>
Co-committed-by: Michael Grote <michael.grote@posteo.de>
2024-02-16 09:15:56 +01:00

27 lines
591 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: add user to sudoers
become: true
ansible.builtin.blockinfile:
path: /etc/sudoers
state: present
block: |
munin ALL=(ALL) NOPASSWD:ALL
validate: '/usr/sbin/visudo -cf %s'
backup: true
marker_begin: munin-sudoers BEGIN
marker_end: munin-sudoers END