first commit
commit
baae605f91
|
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
# defaults file for munin-node
|
||||||
|
munin_node_host_name: "{{ inventory_hostname }}"
|
||||||
|
|
||||||
|
munin_node_ip_bind: "*"
|
||||||
|
munin_node_port: "4949"
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
# handlers file for munin-node
|
||||||
|
- name: restart munin-node
|
||||||
|
action: service name=munin-node state=restarted daemon_reload=yes
|
||||||
|
listen: "restart services"
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
---
|
||||||
|
# tasks file for munin-node
|
||||||
|
- name: Installation munin-node
|
||||||
|
apt:
|
||||||
|
pkg:
|
||||||
|
- munin-node
|
||||||
|
ignore_errors: yes
|
||||||
|
|
||||||
|
- name: fix munin-node.service for LXC
|
||||||
|
template:
|
||||||
|
src: munin-node.service.j2
|
||||||
|
dest: /lib/systemd/system/munin-node.service
|
||||||
|
mode: '0777'
|
||||||
|
backup: yes
|
||||||
|
when:
|
||||||
|
- "ansible_facts['virtualization_type'] == 'lxc'"
|
||||||
|
- "ansible_facts['distribution'] == 'Debian'"
|
||||||
|
- "ansible_facts['distribution_release'] == 'buster'"
|
||||||
|
|
||||||
|
- name: copy munin-node.conf
|
||||||
|
template:
|
||||||
|
src: munin-node.conf.j2
|
||||||
|
dest: /etc/munin/munin-node.conf
|
||||||
|
backup: yes
|
||||||
|
notify: restart munin-node
|
||||||
|
|
||||||
|
- name: enable munin-node service
|
||||||
|
systemd:
|
||||||
|
name: munin-node
|
||||||
|
enabled: yes
|
||||||
|
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
log_level 4
|
||||||
|
log_file /var/log/munin/munin-node.log
|
||||||
|
pid_file /var/run/munin/munin-node.pid
|
||||||
|
|
||||||
|
background 1
|
||||||
|
setsid 1
|
||||||
|
|
||||||
|
user root
|
||||||
|
group root
|
||||||
|
|
||||||
|
ignore_file [\#~]$
|
||||||
|
ignore_file DEADJOE$
|
||||||
|
ignore_file \.bak$
|
||||||
|
ignore_file %$
|
||||||
|
ignore_file \.dpkg-(tmp|new|old|dist)$
|
||||||
|
ignore_file \.rpm(save|new)$
|
||||||
|
ignore_file \.pod$
|
||||||
|
|
||||||
|
{% for ip in munin_servers %}
|
||||||
|
allow ^{{ ip | regex_replace('\.', '\\\.') }}$
|
||||||
|
{% endfor %}
|
||||||
|
allow ^127\.0\.0\.1$
|
||||||
|
allow ^::1$
|
||||||
|
|
||||||
|
host_name {{ munin_node_host_name }}
|
||||||
|
|
||||||
|
host {{ munin_node_ip_bind }}
|
||||||
|
port {{ munin_node_port }}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Munin Node
|
||||||
|
Documentation=man:munin-node(1) http://munin.readthedocs.org/en/stable-2.0/reference/munin-node.html
|
||||||
|
After=network-online.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
EnvironmentFile=-/etc/default/munin-node
|
||||||
|
Type=forking
|
||||||
|
Restart=always
|
||||||
|
ExecStart=/usr/sbin/munin-node $DAEMON_ARGS
|
||||||
|
PIDFile=/run/munin/munin-node.pid
|
||||||
|
|
||||||
|
|
||||||
|
PrivateDevices=false
|
||||||
|
PrivateTmp=false
|
||||||
|
ProtectHome=false
|
||||||
|
ProtectSystem=false
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
|
||||||
Loading…
Reference in New Issue