summaryrefslogtreecommitdiff
path: root/roles/install_monitoring/tasks/install_munin.yml
blob: bda0e6f82e8d2cfe89d8790a8c613d87ed6445f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
---
- name: install munin
  pacman:
      name: munin-node
      state: present

- name: copy munin-node config
  template:
      src: munin-node.conf.j2
      dest: /etc/munin/munin-node.conf
  notify: restart munin-node

- name: copy fastd plugin
  copy:
      src: munin/munin_fastd_plugin
      dest: /usr/lib/munin/plugins/fastd_
      mode: 0755

- name: copy dhcp-pool plugin
  copy:
      src: munin/munin_dhcp_pool_plugin
      dest: /usr/lib/munin/plugins/dhcp-pool
      mode: 0755

- name: copy fastd plugin config
  copy:
      src: munin/munin_fastd_conf
      dest: /etc/munin/plugin-conf.d/fastd
  notify: restart munin-node

- name: copy global config
  copy:
      src: munin/munin_global_conf
      dest: /etc/munin/plugin-conf.d/global
  notify: restart munin-node

- name: install netstat
  pacman:
      name: net-tools
      state: present

- name: install perl-lwp-protocol-https
  pacman:
      name: perl-lwp-protocol-https
      state: present

- name: install perl-json
  pacman:
      name: perl-json
      state: present

- name: enable munin plugins
  file:
      path: /etc/munin/plugins/{{ item.name }}
      src: /usr/lib/munin/plugins/{{ item.plugin | default( item.name ) }}
      state: link
  with_items: "{{ munin_node_plugins }}"
  notify: restart munin-node

- name: start and enable munin-node
  systemd:
      name: munin-node.service
      enabled: yes
      state: started