2019-09-14 23:58:46 +00:00
|
|
|
- name: 'Install 5 packages: munin, munin-node, munin-plugins-extra, libcgi-fast-perl, libapache2-mod-fcgid (debuntu)'
|
|
|
|
package:
|
|
|
|
name:
|
|
|
|
- munin
|
|
|
|
- munin-node
|
|
|
|
- munin-plugins-extra
|
|
|
|
- libcgi-fast-perl
|
|
|
|
- libapache2-mod-fcgid
|
|
|
|
state: present
|
2020-01-13 23:57:54 +00:00
|
|
|
#tags: download
|
2019-09-14 23:58:46 +00:00
|
|
|
when: is_debuntu | bool
|
|
|
|
|
|
|
|
- name: "Install 2 packages: munin, munin-node (OS's other than debuntu)"
|
|
|
|
package:
|
|
|
|
name:
|
|
|
|
- munin
|
|
|
|
- munin-node
|
|
|
|
state: present
|
2020-01-13 23:57:54 +00:00
|
|
|
#tags: download
|
2019-09-14 23:58:46 +00:00
|
|
|
when: not is_debuntu
|
|
|
|
|
|
|
|
- name: Install /etc/munin/munin.conf and Apache's munin24.conf, from templates
|
|
|
|
template:
|
|
|
|
src: "{{ item.src }}"
|
|
|
|
dest: "{{ item.dest }}"
|
2020-01-13 23:57:54 +00:00
|
|
|
# owner: root
|
|
|
|
# group: root
|
|
|
|
# mode: 0644
|
2019-09-14 23:58:46 +00:00
|
|
|
with_items:
|
|
|
|
- { src: 'munin.conf.j2', dest: '/etc/munin/munin.conf' }
|
|
|
|
- { src: 'munin24.conf.j2', dest: '/etc/{{ apache_config_dir }}/munin24.conf' }
|
|
|
|
|
|
|
|
- name: Establish username/password Admin/changeme in /etc/munin/munin-htpasswd
|
|
|
|
htpasswd:
|
|
|
|
path: /etc/munin/munin-htpasswd
|
|
|
|
name: Admin
|
|
|
|
password: changeme
|
|
|
|
|
2020-01-14 00:13:10 +00:00
|
|
|
- name: If MySQL is enabled, let Munin monitor it
|
|
|
|
copy:
|
|
|
|
src: "{{ item }}"
|
|
|
|
dest: /etc/munin/plugins/
|
|
|
|
with_items:
|
|
|
|
- /usr/share/munin/plugins/mysql_
|
|
|
|
- /usr/share/munin/plugins/mysql_bytes
|
|
|
|
- /usr/share/munin/plugins/mysql_innodb
|
|
|
|
- /usr/share/munin/plugins/mysql_isam_space_
|
|
|
|
- /usr/share/munin/plugins/mysql_queries
|
|
|
|
- /usr/share/munin/plugins/mysql_slowqueries
|
|
|
|
- /usr/share/munin/plugins/mysql_threads
|
|
|
|
when: mysql_enabled | bool
|
|
|
|
|
2020-01-12 23:15:33 +00:00
|
|
|
- name: "Add 'munin_installed: True' to {{ iiab_state_file }}"
|
2019-09-14 23:58:46 +00:00
|
|
|
lineinfile:
|
2020-01-12 23:15:33 +00:00
|
|
|
dest: "{{ iiab_state_file }}" # /etc/iiab/iiab_state.yml
|
2019-09-14 23:58:46 +00:00
|
|
|
regexp: '^munin_installed'
|
2019-10-07 17:11:21 +00:00
|
|
|
line: 'munin_installed: True'
|