ansible-collection-prometheus/roles/node_exporter/tasks/configure.yml
gardar 3c5d710747
refactor(node_exporter): delegate common tasks to _common role
Signed-off-by: gardar <gardar@users.noreply.github.com>
2024-10-15 17:08:40 +00:00

30 lines
980 B
YAML

---
- name: Configure
ansible.builtin.include_role:
name: prometheus.prometheus._common
tasks_from: configure.yml
vars:
_common_system_user: "{{ node_exporter_system_user }}"
_common_system_group: "{{ node_exporter_system_group }}"
_common_config_dir: "{{ node_exporter_config_dir }}"
_common_tls_server_config: "{{ node_exporter_tls_server_config }}"
_common_http_server_config: "{{ node_exporter_http_server_config }}"
_common_basic_auth_users: "{{ node_exporter_basic_auth_users }}"
tags:
- node_exporter
- configure
- node_exporter_configure
- name: Create textfile collector dir
ansible.builtin.file:
path: "{{ node_exporter_textfile_dir }}"
state: directory
owner: "{{ node_exporter_system_user }}"
group: "{{ node_exporter_system_group }}"
mode: u+rwX,g+rwX,o=rX
become: true
when: node_exporter_textfile_dir | length > 0
tags:
- node_exporter
- configure
- node_exporter_configure