2021-07-29 14:23:23 +00:00
|
|
|
- name: "Install 5 packages: libcgi-fast-perl, munin, munin-node, munin-plugins-extra, python3-passlib"
|
2019-09-14 23:58:46 +00:00
|
|
|
package:
|
|
|
|
name:
|
2021-07-29 14:23:23 +00:00
|
|
|
#- libapache2-mod-fcgid
|
|
|
|
- libcgi-fast-perl
|
2019-09-14 23:58:46 +00:00
|
|
|
- munin
|
|
|
|
- munin-node
|
|
|
|
- munin-plugins-extra
|
2021-07-29 16:34:32 +00:00
|
|
|
- python3-passlib # For Ansible module 'htpasswd' in Ansible collection community.general -- used just below
|
2019-09-14 23:58:46 +00:00
|
|
|
state: present
|
|
|
|
|
|
|
|
- name: Establish username/password Admin/changeme in /etc/munin/munin-htpasswd
|
|
|
|
htpasswd:
|
|
|
|
path: /etc/munin/munin-htpasswd
|
2021-07-06 21:59:07 +00:00
|
|
|
name: "{{ munin_username}}" # Admin
|
2020-01-18 06:28:09 +00:00
|
|
|
password: "{{ munin_password }}" # changeme
|
2019-09-14 23:58:46 +00:00
|
|
|
|
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
|
2020-10-16 20:46:19 +00:00
|
|
|
when: mysql_enabled
|
2020-01-14 00:13:10 +00:00
|
|
|
|
2020-01-30 09:00:00 +00:00
|
|
|
|
|
|
|
# RECORD Munin AS INSTALLED
|
|
|
|
|
|
|
|
- name: "Set 'munin_installed: True'"
|
|
|
|
set_fact:
|
|
|
|
munin_installed: True
|
|
|
|
|
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-02-04 00:54:04 +00:00
|
|
|
path: "{{ 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'
|