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

31 lines
1.1 KiB
YAML

---
- name: Configure
ansible.builtin.include_role:
name: prometheus.prometheus._common
tasks_from: configure.yml
vars:
_common_system_user: "{{ mysqld_exporter_system_user }}"
_common_system_group: "{{ mysqld_exporter_system_group }}"
_common_config_dir: "{{ mysqld_exporter_config_dir }}"
_common_tls_server_config: "{{ mysqld_exporter_tls_server_config }}"
_common_http_server_config: "{{ mysqld_exporter_http_server_config }}"
_common_basic_auth_users: "{{ mysqld_exporter_basic_auth_users }}"
tags:
- mysqld_exporter
- configure
- mysqld_exporter_configure
- name: Copy the mysqld_exporter config file
ansible.builtin.template:
src: my_cnf.j2
dest: "{{ mysqld_exporter_config_dir }}/{{ mysqld_exporter_config_file }}"
owner: root
group: '{{ mysqld_exporter_system_group }}'
mode: '0640'
no_log: "{{ false if (lookup('env', 'CI')) or (lookup('env', 'MOLECULE_PROVISIONER_NAME')) else true }}"
become: true
notify: restart mysqld_exporter
tags:
- mysqld_exporter
- configure
- mysqld_exporter_configure