forked from evolix/ansible-roles
Merge branch '2223-apache-munin' into unstable
This commit is contained in:
commit
ba99bf602a
|
@ -13,5 +13,8 @@ apache_phpmyadmin_set: False
|
|||
apache_phpmyadmin_suffix: ""
|
||||
apache_serverstatus_suffix: ""
|
||||
|
||||
apache_log2mail_include: True
|
||||
apache_munin_include: True
|
||||
|
||||
general_alert_email: "root@localhost"
|
||||
log2mail_alert_email: Null
|
||||
|
|
|
@ -8,3 +8,8 @@
|
|||
service:
|
||||
name: apache2
|
||||
state: reloaded
|
||||
|
||||
- name: reload munin-node
|
||||
service:
|
||||
name: munin-node
|
||||
state: reloaded
|
||||
|
|
15
apache/tasks/log2mail.yml
Normal file
15
apache/tasks/log2mail.yml
Normal file
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
|
||||
- name: log2mail is installed
|
||||
apt:
|
||||
name: log2mail
|
||||
state: present
|
||||
|
||||
- name: Add log2mail config for Apache segfaults
|
||||
template:
|
||||
src: log2mail-apache.j2
|
||||
dest: "/etc/log2mail/config/apache"
|
||||
owner: log2mail
|
||||
group: adm
|
||||
mode: "0644"
|
||||
force: no
|
|
@ -139,19 +139,6 @@
|
|||
- include: phpmyadmin.yml
|
||||
when: apache_phpmyadmin_set and _default_index.stat.exists
|
||||
|
||||
- name: Check if log2mail is installed
|
||||
apt:
|
||||
name: log2mail
|
||||
state: present
|
||||
|
||||
- name: Add log2mail config for Apache segfaults
|
||||
template:
|
||||
src: log2mail-apache.j2
|
||||
dest: "/etc/log2mail/config/apache"
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0644"
|
||||
force: no
|
||||
|
||||
# - block:
|
||||
# - name: generate random string for serverstatus suffix
|
||||
|
@ -169,3 +156,9 @@
|
|||
# dest: /var/www/index.html
|
||||
# regexp: '__SERVERSTATUS_SUFFIX__'
|
||||
# replace: "{{ apache_serverstatus_suffix }}"
|
||||
|
||||
- include: log2mail.yml
|
||||
when: apache_log2mail_include
|
||||
|
||||
- include: munin.yml
|
||||
when: apache_munin_include
|
||||
|
|
23
apache/tasks/munin.yml
Normal file
23
apache/tasks/munin.yml
Normal file
|
@ -0,0 +1,23 @@
|
|||
---
|
||||
|
||||
- name: munin-node and core plugins are installed
|
||||
apt:
|
||||
name: "{{ item }}"
|
||||
state: installed
|
||||
with_items:
|
||||
- munin-node
|
||||
- munin-plugins-core
|
||||
|
||||
- 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
|
Loading…
Reference in a new issue