prometheus/tasks/exporter/mongodb.yml
2022-11-11 23:51:52 +01:00

27 lines
688 B
YAML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
- include_tasks: _common.yml
tags: ['prometheus_mongodb']
- name: 'mongodb exporter < v0.2 | move to /usr/local/bin'
copy:
src: /tmp/mongodb_exporter
dest: /usr/local/bin/prometheus-mongodb-exporter
remote_src: yes
owner: root
group: root
mode: 0755
notify:
- 'prometheus | mongodb exporter | restart service'
when:
- prometheus_mongodb_exporter_latest_version.stdout < '0.2'
- name: 'mongodb exporter | configuration'
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'