ansible-role-apache/tasks/monitoring.yml

37 lines
1,002 B
YAML
Raw Normal View History

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