ansible-roles/apache/tasks/munin.yml
2018-05-18 09:33:25 +02:00

56 lines
1 KiB
YAML

---
- name: "Install munin-node and core plugins packages"
apt:
name: "{{ item }}"
state: present
with_items:
- munin-node
- munin-plugins-core
tags:
- apache
- munin
- name: "Enable Munin plugins"
file:
src: "/usr/share/munin/plugins/{{ item }}"
dest: "/etc/munin/plugins/{{ item }}"
state: link
with_items:
- apache_accesses
- apache_processes
- apache_volume
notify: restart munin-node
tags:
- apache
- munin
- name: "Install fcgi packages for Munin graphs"
apt:
name: "{{ item }}"
state: present
with_items:
- libapache2-mod-fcgid
- libcgi-fast-perl
notify: reload apache
tags:
- apache
- munin
- name: "Enable libapache2-mod-fcgid"
command: a2enmod fcgid
register: cmd_enable_fcgid
changed_when: "'Module fcgid already enabled' not in cmd_enable_fcgid.stdout"
notify: restart apache
tags:
- apache
- munin
- name: "Apache has access to /var/log/munin/"
file:
path: /var/log/munin/
group: www-data
tags:
- apache
- munin