prometheus/tasks/exporter/mongodb.yml

27 lines
688 B
YAML
Raw Normal View History

2021-04-29 18:53:56 +02:00
---
2022-11-11 23:51:52 +01:00
- include_tasks: _common.yml
tags: ['prometheus_mongodb']
2021-04-29 18:53:56 +02:00
2022-11-11 21:08:07 +01:00
- name: 'mongodb exporter < v0.2 | move to /usr/local/bin'
2021-04-29 18:53:56 +02:00
copy:
2021-05-31 15:42:33 +02:00
src: /tmp/mongodb_exporter
2021-04-29 18:53:56 +02:00
dest: /usr/local/bin/prometheus-mongodb-exporter
remote_src: yes
owner: root
group: root
mode: 0755
notify:
- 'prometheus | mongodb exporter | restart service'
2021-05-31 15:42:33 +02:00
when:
- prometheus_mongodb_exporter_latest_version.stdout < '0.2'
2021-05-31 15:42:33 +02:00
2022-11-11 21:08:07 +01:00
- name: 'mongodb exporter | configuration'
2021-10-29 18:23:10 +02:00
template:
src: conf/prometheus-mongodb-exporter.j2
dest: /etc/default/prometheus-mongodb-exporter
owner: root
group: root
mode: 0600
notify:
- 'prometheus | mongodb exporter | restart service'