33 lines
942 B
YAML
33 lines
942 B
YAML
---
|
|
- name: "Monitoring | Enable Munin plugin"
|
|
ansible.builtin.file:
|
|
src: "/usr/share/munin/plugins/nginx_{{ item }}"
|
|
dest: "/etc/munin/plugins/nginx_{{ item }}"
|
|
state: link
|
|
loop:
|
|
- request
|
|
- status
|
|
notify: restart munin-node
|
|
when: "'munin-node' in ansible_facts.packages"
|
|
|
|
- name: "Monitoring | Copy statistics configuration file"
|
|
ansible.builtin.template:
|
|
src: local-statistics.j2
|
|
dest: /etc/nginx/sites-available/local-statistics
|
|
mode: 0644
|
|
notify: reload nginx
|
|
|
|
- name: "Monitoring | Enable local statistics"
|
|
ansible.builtin.file:
|
|
src: /etc/nginx/sites-available/local-statistics
|
|
dest: /etc/nginx/sites-enabled/local-statistics
|
|
state: link
|
|
notify: reload nginx
|
|
|
|
- name: "Monitoring | Copy Monit configuration"
|
|
ansible.builtin.template:
|
|
src: monit.j2
|
|
dest: /etc/monit/conf-enabled/nginx
|
|
mode: 0644
|
|
notify: reload monit
|
|
when: "'monit' in ansible_facts.packages"
|