mirror of
https://github.com/prometheus-community/ansible
synced 2024-11-22 03:43:09 +00:00
330e66a75d
Signed-off-by: gardar <gardar@users.noreply.github.com>
31 lines
1.1 KiB
YAML
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
|