forked from cloudalchemy/ansible-node-exporter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplaybook.yml
38 lines (37 loc) · 1.12 KB
/
playbook.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
---
- name: Run role
hosts: all
any_errors_fatal: true
roles:
- ansible-node-exporter
pre_tasks:
- name: Create node_exporter cert dir
file:
path: "{{ node_exporter_tls_server_config.cert_file | dirname }}"
state: directory
owner: root
group: root
- name: Copy cert and key
copy:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
with_items:
- src: "/tmp/tls.cert"
dest: "{{ node_exporter_tls_server_config.cert_file }}"
- src: "/tmp/tls.key"
dest: "{{ node_exporter_tls_server_config.key_file }}"
vars:
node_exporter_binary_local_dir: "/tmp/node_exporter-linux-amd64"
node_exporter_web_listen_address: "127.0.0.1:8080"
node_exporter_textfile_dir: ""
node_exporter_enabled_collectors:
- entropy
node_exporter_disabled_collectors:
- diskstats
node_exporter_tls_server_config:
cert_file: /etc/node_exporter/tls.cert
key_file: /etc/node_exporter/tls.key
node_exporter_http_server_config:
http2: true
node_exporter_basic_auth_users:
randomuser: examplepassword