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
|
2021-05-26 18:23:12 +02:00
|
|
|
notify:
|
2022-11-14 10:58:21 +01:00
|
|
|
- 'prometheus | mongodb exporter | restart service'
|
2021-05-31 15:42:33 +02:00
|
|
|
when:
|
2021-10-04 18:03:02 +02:00
|
|
|
- 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:
|
2022-11-14 10:58:21 +01:00
|
|
|
- 'prometheus | mongodb exporter | restart service'
|