1
0
Fork 0
mirror of https://gitlab.com/s3lph/ansible-collection-prometheus synced 2024-11-24 18:51:02 +01:00
ansible-collection-prometheus/roles/prometheus_node_openbsd/tasks/config.yml

29 lines
814 B
YAML
Raw Permalink Normal View History

2020-11-18 02:12:27 +01:00
---
- 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