ansible/roles/monitoring/tasks/main.yaml

43 lines
869 B
YAML

---
- name: Install nginx site
ansible.builtin.template:
src: nginx-site.conf
dest: /etc/nginx/sites-available/monitoring
owner: root
group: root
mode: 0644
notify: Reload nginx
- name: Enable nginx site
ansible.builtin.file:
src: /etc/nginx/sites-available/monitoring
dest: /etc/nginx/sites-enabled/monitoring
state: link
notify: Reload nginx
- name: Start nginx
ansible.builtin.systemd:
name: nginx
state: started
enabled: true
- name: mqtt_exporter
tags: mqtt_exporter
ansible.builtin.import_tasks:
file: mqtt_exporter.yaml
- name: blackbox
tags: blackbox
ansible.builtin.import_tasks:
file: blackbox.yaml
- name: prometheus
tags: prometheus
ansible.builtin.import_tasks:
file: prometheus.yaml
- name: grafana
tags: grafana
ansible.builtin.import_tasks:
file: grafana.yaml