Add configuration for Postgres Prom exporter

This commit is contained in:
2023-12-10 02:53:11 -05:00
parent 258b5792da
commit c7d914696b
3 changed files with 21 additions and 0 deletions

View File

@ -46,6 +46,17 @@
until: apt_res is success
when: enable_prometheus_exporters is defined and enable_prometheus_exporters
- name: install Prometheus postgresql exporter config if enabled
template:
src: patroni/prometheus.env.j2
dest: /etc/default/prometheus-postgres-exporter
owner: prometheus
group: prometheus
mode: 0640
notify:
- restart prometheus-postgres
when: enable_prometheus_exporters is defined and enable_prometheus_exporters
- name: stop and disable postgresql
service:
name: "{{ item }}"