Apache: improve munin integration
* ansible syntax * remove duplicate tasks * improve tasks names
This commit is contained in:
parent
3d7a544820
commit
1776b4bc24
|
@ -1,14 +1,17 @@
|
||||||
---
|
---
|
||||||
|
|
||||||
- name: munin-node and core plugins are installed
|
- name: "Install munin-node and core plugins packages"
|
||||||
apt:
|
apt:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
state: installed
|
state: installed
|
||||||
with_items:
|
with_items:
|
||||||
- munin-node
|
- munin-node
|
||||||
- munin-plugins-core
|
- munin-plugins-core
|
||||||
|
tags:
|
||||||
|
- apache
|
||||||
|
- munin
|
||||||
|
|
||||||
- name: enable munin plugins
|
- name: "Enable Munin plugins"
|
||||||
file:
|
file:
|
||||||
src: "/usr/share/munin/plugins/{{ item }}"
|
src: "/usr/share/munin/plugins/{{ item }}"
|
||||||
dest: "/etc/munin/plugins/{{ item }}"
|
dest: "/etc/munin/plugins/{{ item }}"
|
||||||
|
@ -22,9 +25,7 @@
|
||||||
- apache
|
- apache
|
||||||
- munin
|
- munin
|
||||||
|
|
||||||
---
|
- name: "Install fcgi packages for Munin graphs"
|
||||||
|
|
||||||
- name: install packages for Apache and Munin
|
|
||||||
apt:
|
apt:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
state: installed
|
state: installed
|
||||||
|
@ -36,7 +37,7 @@
|
||||||
- apache
|
- apache
|
||||||
- munin
|
- munin
|
||||||
|
|
||||||
- name: be sure to enable libapache2-mod-fcgid
|
- name: "Enable libapache2-mod-fcgid"
|
||||||
command: a2enmod fcgid
|
command: a2enmod fcgid
|
||||||
register: cmd_enable_fcgid
|
register: cmd_enable_fcgid
|
||||||
changed_when: "'Module fcgid already enabled' not in cmd_enable_fcgid.stdout"
|
changed_when: "'Module fcgid already enabled' not in cmd_enable_fcgid.stdout"
|
||||||
|
@ -45,24 +46,10 @@
|
||||||
- apache
|
- apache
|
||||||
- munin
|
- munin
|
||||||
|
|
||||||
- name: change group for /var/log/munin/
|
- name: "Apache has access to /var/log/munin/"
|
||||||
file:
|
file:
|
||||||
path: /var/log/munin/
|
path: /var/log/munin/
|
||||||
group: www-data
|
group: www-data
|
||||||
tags:
|
tags:
|
||||||
- apache
|
- apache
|
||||||
- munin
|
- 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
|
|
||||||
|
|
Loading…
Reference in a new issue