mirror of
https://gitlab.com/s3lph/ansible-collection-prometheus
synced 2024-11-24 18:51:02 +01:00
28 lines
814 B
YAML
28 lines
814 B
YAML
---
|
|
|
|
- name: create /etc/prometheus/node-exporter/tls
|
|
file:
|
|
path: /etc/prometheus/node-exporter/tls
|
|
state: directory
|
|
owner: _nodeexporter
|
|
group: _nodeexporter
|
|
|
|
- name: render /etc/prometheus/node-exporter/tls/config.yml
|
|
template:
|
|
src: prometheus-node-exporter-webconfig.yml.j2
|
|
dest: /etc/prometheus/node-exporter/tls/config.yml
|
|
owner: _nodeexporter
|
|
group: _nodeexporter
|
|
notify: restart node exporter
|
|
|
|
- name: configure node exporter
|
|
lineinfile:
|
|
path: /etc/rc.conf.local
|
|
line: >-
|
|
node_exporter_flags=--collector.textfile.directory={{ node_exporter_textfile_dir }}
|
|
{{ node_exporter_flags }}
|
|
--web.config=/etc/prometheus/node-exporter/tls/config.yml
|
|
regexp: ^node_exporter_flags=.*$
|
|
notify:
|
|
- start node exporter
|
|
- restart node exporter
|