27 lines
686 B
YAML
27 lines
686 B
YAML
---
|
|
- 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'
|