2016-12-16 12:26:29 +01:00
|
|
|
---
|
|
|
|
|
2021-06-10 11:09:44 +02:00
|
|
|
- include_role:
|
|
|
|
name: remount-usr
|
|
|
|
|
|
|
|
- name: Create local munin directory
|
|
|
|
file:
|
|
|
|
name: /usr/local/share/munin/
|
|
|
|
state: directory
|
|
|
|
mode: "0755"
|
|
|
|
|
|
|
|
- name: Create plugin directory
|
|
|
|
file:
|
|
|
|
name: /usr/local/share/munin/plugins/
|
|
|
|
state: directory
|
|
|
|
mode: "0755"
|
|
|
|
|
2016-12-16 12:26:29 +01:00
|
|
|
- name: Get Munin plugins
|
|
|
|
get_url:
|
2017-04-20 14:10:49 +02:00
|
|
|
url: "https://raw.githubusercontent.com/munin-monitoring/contrib/master/plugins/libvirt/{{ item }}"
|
2021-06-10 11:09:44 +02:00
|
|
|
dest: "/usr/local/share/munin/plugins/"
|
2017-03-23 16:59:43 +01:00
|
|
|
mode: "0755"
|
2021-06-10 11:09:44 +02:00
|
|
|
force: no
|
|
|
|
loop:
|
|
|
|
- kvm_cpu
|
|
|
|
- kvm_io
|
|
|
|
- kvm_mem
|
|
|
|
notify: restart munin-node
|
|
|
|
|
2022-06-08 15:38:48 +02:00
|
|
|
- name: Enable Munin plugins
|
2021-06-10 11:09:44 +02:00
|
|
|
file:
|
2022-06-08 15:38:48 +02:00
|
|
|
src: "/usr/local/share/munin/plugins/{{ plugin_name }}"
|
|
|
|
dest: "/etc/munin/plugins/{{ plugin_name }}"
|
2021-06-10 11:09:44 +02:00
|
|
|
state: link
|
2021-06-10 16:30:17 +02:00
|
|
|
force: yes
|
2021-05-04 14:18:40 +02:00
|
|
|
loop:
|
2021-06-10 11:09:44 +02:00
|
|
|
- kvm_cpu
|
|
|
|
- kvm_io
|
|
|
|
- kvm_mem
|
2022-06-08 15:38:48 +02:00
|
|
|
loop_control:
|
|
|
|
loop_var: plugin_name
|
2016-12-16 12:26:29 +01:00
|
|
|
notify: restart munin-node
|
|
|
|
|
|
|
|
- name: Copy Munin plugins conf
|
|
|
|
copy:
|
|
|
|
src: files/munin-plugins
|
2016-12-23 15:13:45 +01:00
|
|
|
dest: "/etc/munin/plugin-conf.d/kvm"
|
2017-06-05 16:31:11 +02:00
|
|
|
mode: "0644"
|
2016-12-16 12:26:29 +01:00
|
|
|
notify: restart munin-node
|