Add prometheus role
This commit is contained in:
28
roles/prometheus/tasks/main.yml
Normal file
28
roles/prometheus/tasks/main.yml
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
- name: Prometheus
|
||||
ansible.builtin.import_role:
|
||||
name: service
|
||||
vars:
|
||||
service_name: prometheus
|
||||
service_container_image: "docker.io/prom/prometheus:latest"
|
||||
service_container_mounts:
|
||||
- type: template
|
||||
source: prometheus.yml.j2
|
||||
destination: /etc/prometheus/prometheus.yml
|
||||
- type: volume
|
||||
source: data
|
||||
destination: /prometheus
|
||||
- type: template
|
||||
source: alerting/node-exporter.yaml.j2
|
||||
destination: /etc/prometheus/alerting/node-exporter.yaml
|
||||
- type: template
|
||||
source: alerting/blackbox-exporter.yaml.j2
|
||||
destination: /etc/prometheus/alerting/blackbox-exporter.yaml
|
||||
service_container_additional_networks: "{{ prometheus_additional_networks }}"
|
||||
service_additional_containers:
|
||||
- name: blackbox-exporter
|
||||
image: docker.io/prom/blackbox-exporter:latest
|
||||
mounts:
|
||||
- type: template
|
||||
source: blackbox_exporter.yml.j2
|
||||
destination: /etc/blackbox_exporter/config.yml
|
||||
Reference in New Issue
Block a user