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

32 lines
1 KiB
YAML

---
- name: Configure
ansible.builtin.include_role:
name: prometheus.prometheus._common
tasks_from: configure.yml
vars:
_common_system_user: "{{ process_exporter_system_user }}"
_common_system_group: "{{ process_exporter_system_group }}"
_common_config_dir: "{{ process_exporter_config_dir }}"
_common_tls_server_config: "{{ process_exporter_tls_server_config }}"
_common_http_server_config: "{{ process_exporter_http_server_config }}"
_common_basic_auth_users: "{{ process_exporter_basic_auth_users }}"
tags:
- process_exporter
- configure
- process_exporter_configure
- name: Create/Update configuration file
ansible.builtin.template:
src: "config.yml.j2"
dest: "/etc/process_exporter/config.yml"
owner: "{{ process_exporter_system_user }}"
group: "{{ process_exporter_system_group }}"
mode: 0644
when:
- process_exporter_names != []
notify: restart process_exporter
become: true
tags:
- process_exporter
- configure
- process_exporter_configure