ansible-role-apache/tasks/monitoring.yml

36 lines
1,002 B
YAML

---
- name: "monitoring | Aktiviere Apache-Module"
ansible.builtin.apache2_module:
name: status
state: present
notify: reload apache2
- name: "monitoring | Kopiere Konfigurationsdatei"
ansible.builtin.copy:
src: server-status.conf
dest: /etc/apache2/sites-available/server-status.conf
mode: 0644
- name: "monitoring | Aktiviere Seitenkonfiguration für Localhost"
ansible.builtin.command:
cmd: a2ensite server-status
creates: /etc/apache2/sites-enabled/server-status.conf
notify: reload apache2
- name: "monitoring | Kopiere Munin-Konfiguration"
ansible.builtin.template:
src: munin.j2
dest: /etc/munin/plugin-conf.d/yyy-apache
mode: 0644
notify: restart munin-node
- name: "monitoring | Aktiviere Munin-Plugins"
ansible.builtin.file:
src: "/usr/share/munin/plugins/{{ item }}"
dest: "/etc/munin/plugins/{{ item }}"
state: link
loop:
- apache_accesses
- apache_processes
- apache_volume
notify: restart munin-node