Merge branch 'apache-munin' into unstable
This commit is contained in:
commit
50cba28f7b
|
@ -135,6 +135,20 @@
|
||||||
tags:
|
tags:
|
||||||
- apache
|
- apache
|
||||||
|
|
||||||
|
- include: phpmyadmin.yml
|
||||||
|
when: _default_index.stat.exists
|
||||||
|
|
||||||
|
- name: Check if Munin plugins exists
|
||||||
|
stat:
|
||||||
|
path: /etc/munin/plugins/
|
||||||
|
register: _munin_plugins
|
||||||
|
check_mode: no
|
||||||
|
tags:
|
||||||
|
- apache
|
||||||
|
|
||||||
|
- include: munin.yml
|
||||||
|
when: _munin_plugins.stat.exists
|
||||||
|
|
||||||
# - block:
|
# - block:
|
||||||
# - name: generate random string for serverstatus suffix
|
# - name: generate random string for serverstatus suffix
|
||||||
# command: "apg -a 1 -M N -n 1"
|
# command: "apg -a 1 -M N -n 1"
|
||||||
|
|
|
@ -21,3 +21,48 @@
|
||||||
tags:
|
tags:
|
||||||
- apache
|
- apache
|
||||||
- munin
|
- munin
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
- name: install packages for Apache and Munin
|
||||||
|
apt:
|
||||||
|
name: "{{ item }}"
|
||||||
|
state: installed
|
||||||
|
with_items:
|
||||||
|
- libapache2-mod-fcgid
|
||||||
|
- libcgi-fast-perl
|
||||||
|
notify: reload apache
|
||||||
|
tags:
|
||||||
|
- apache
|
||||||
|
- munin
|
||||||
|
|
||||||
|
- name: be sure to 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: change group for /var/log/munin/
|
||||||
|
file:
|
||||||
|
path: /var/log/munin/
|
||||||
|
group: www-data
|
||||||
|
tags:
|
||||||
|
- apache
|
||||||
|
- munin
|
||||||
|
|
||||||
|
- name: install munin plugins
|
||||||
|
file:
|
||||||
|
src: "/etc/munin/plugins/{{ item }}"
|
||||||
|
dest: "/usr/share/munin/plugins/{{ item }}"
|
||||||
|
state: link
|
||||||
|
with_items:
|
||||||
|
- apache_accesses
|
||||||
|
- apache_processes
|
||||||
|
- apache_volume
|
||||||
|
notify: restart munin-node
|
||||||
|
tags:
|
||||||
|
- apache
|
||||||
|
- munin
|
||||||
|
|
|
@ -19,11 +19,13 @@
|
||||||
Require all denied
|
Require all denied
|
||||||
Include /etc/apache2/ipaddr_whitelist.conf
|
Include /etc/apache2/ipaddr_whitelist.conf
|
||||||
</Directory>
|
</Directory>
|
||||||
<Directory /usr/lib/munin/cgi/>
|
# munin-cgi-graph, used for zooming on graphs.
|
||||||
Options -Indexes
|
ScriptAlias /munin-cgi/munin-cgi-graph /usr/lib/munin/cgi/munin-cgi-graph
|
||||||
|
<Location /munin-cgi/munin-cgi-graph>
|
||||||
|
Options +ExecCGI
|
||||||
Require all denied
|
Require all denied
|
||||||
Include /etc/apache2/ipaddr_whitelist.conf
|
Include /etc/apache2/private_ipaddr_whitelist.conf
|
||||||
</Directory>
|
</Location>
|
||||||
|
|
||||||
# For CGI Scripts. We need to set Directory directive as ScriptAlias take precedence.
|
# For CGI Scripts. We need to set Directory directive as ScriptAlias take precedence.
|
||||||
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
|
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
|
||||||
|
|
Loading…
Reference in a new issue