ansible-collection-prometheus/roles/node_exporter/molecule/alternative/converge.yml
gardar 3c9df6fae7
fix: use fcqn for role names
Signed-off-by: gardar <gardar@users.noreply.github.com>
2023-01-11 19:27:47 +00:00

41 lines
1.2 KiB
YAML

---
- name: Run role
hosts: all
any_errors_fatal: true
roles:
- prometheus.prometheus.node_exporter
pre_tasks:
- name: Create node_exporter cert dir
ansible.builtin.file:
path: "{{ node_exporter_tls_server_config.cert_file | dirname }}"
state: directory
owner: root
group: root
mode: u+rwX,g+rwX,o=rX
- name: Copy cert and key
ansible.builtin.copy:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
mode: "{{ item.mode | default('0644') }}"
loop:
- 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