kolla-ansible/ansible/roles/prometheus/tasks/bootstrap.yml
Dai, Dang Van 8d5355dbc1 Fix bootstrap prometheus container location
This change to fix the case that
I won't use prometheus-mysqld-exporter

Change-Id: I1936bbae0172f4e65605d71066dced837bc30f7a
2018-12-27 12:46:22 +00:00

20 lines
689 B
YAML

---
- name: Creating prometheus database user and setting permissions
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,REPLICATION CLIENT,SELECT"
append_privs: "yes"
run_once: True
delegate_to: "{{ groups['prometheus'][0] }}"
when:
- enable_prometheus_mysqld_exporter | bool
- not use_preconfigured_databases | bool