homeserver/roles/mgrote_munin_node/tasks/user.yml
Michael Grote 6b01cf8879
Some checks failed
ansible-lint / ansible-lint (push) Failing after 4s
gitleaks / gitleaks (push) Successful in 4s
traefik: rate-limit for forgejo (#176)
Reviewed-on: https://git.mgrote.net///mg/homeserver/pulls/176
Co-authored-by: Michael Grote <michael.grote@posteo.de>
Co-committed-by: Michael Grote <michael.grote@posteo.de>

remove ubuntu-pro-client

set rate-limit higher and let... (#177)

Reviewed-on: https://git.mgrote.net///mg/homeserver/pulls/177
Co-authored-by: Michael Grote <michael.grote@posteo.de>
Co-committed-by: Michael Grote <michael.grote@posteo.de>
2024-09-12 13:26:14 +00:00

26 lines
603 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
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