munin-node: Initial version of munin-node role

This commit is contained in:
Timo Makinen 2021-03-18 22:35:11 +00:00
parent 64db5ca467
commit b287591b32
3 changed files with 58 additions and 0 deletions

View file

@ -0,0 +1,5 @@
---
- name: restart munin-node
service:
name: munin-node
state: restarted

View file

@ -0,0 +1,20 @@
---
- name: install packages
package:
name: munin-node
state: installed
- name: create config
template:
dest: /etc/munin/munin-node.conf
src: munin-node.conf.j2
mode: 0644
owner: root
group: "{{ ansible_wheel }}"
notify: restart munin-node
- name: enable service
service:
name: munin-node
state: started
enabled: true

View file

@ -0,0 +1,33 @@
log_level 4
log_file /var/log/munin-node/munin-node.log
pid_file /var/run/munin/munin-node.pid
background 1
setsid 1
user root
group {{ ansible_wheel }}
# Regexps for files to ignore
ignore_file ~$
ignore_file \.bak$
ignore_file %$
ignore_file \.dpkg-(tmp|new|old|dist)$
ignore_file \.rpm(save|new)$
ignore_file \.pod$
host_name {{ inventory_hostname }}
# Which address to bind to;
host *
# And which port
port 4949
# Require TLS
tls paranoid
tls_verify_certificate yes
tls_ca_certificate {{ tls_certs }}/ca.crt
tls_certificate {{ tls_certs }}/{{ inventory_hostname }}.crt
tls_private_key {{ tls_private }}/{{ inventory_hostname }}.key