prometheus/tasks/exporter/mongodb.yml

29 lines
729 B
YAML

---
- include_tasks: _common.yml
tags: ['prometheus_mongodb_exporter']
- 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:
- 'mongodb-exporter-restart'
when:
- prometheus_mongodb_exporter_latest_version.stdout < '0.2'
tags: ['prometheus_mongodb_exporter']
- name: 'mongodb exporter | configuration'
template:
src: conf/prometheus-mongodb-exporter.j2
dest: /etc/default/prometheus-mongodb-exporter
owner: root
group: root
mode: 0600
notify:
- 'mongodb-exporter-restart'
tags: ['prometheus_mongodb_exporter']