kolla-ansible/ansible/roles/prometheus/tasks/bootstrap.yml
Radosław Piliszek c7c14e1c43 Fix privileges for MariaDB 10.5
"BINLOG MONITOR" and "SLAVE MONITOR" replace
"REPLICATION CLIENT" (which is now an alias for "BINLOG MONITOR").
The validation in Ansible MySQL collection is too simple to
understand aliases and breaks. Hence, let's use the canonical
names and adapt per service according to its needs.

Change-Id: I1175e4846384accd19942620dc155d0c5728e64b
2021-10-07 09:24:31 +00:00

21 lines
699 B
YAML

---
- name: Creating prometheus database user and setting permissions
become: true
kolla_toolbox:
module_name: mysql_user
module_args:
login_host: "{{ database_address }}"
login_port: "{{ database_port }}"
login_user: "{{ database_user }}"
login_password: "{{ database_password }}"
name: "{{ prometheus_mysql_exporter_database_user }}"
password: "{{ prometheus_mysql_exporter_database_password }}"
host: "%"
priv: "*.*:PROCESS,SLAVE MONITOR,SELECT"
append_privs: "yes"
run_once: True
delegate_to: "{{ groups['prometheus'][0] }}"
when:
- enable_prometheus_mysqld_exporter | bool
- not use_preconfigured_databases | bool