7233b45d29
Change-Id: I00d2dcb0895548ba169ab85764cf546c2214cbf5
25 lines
788 B
YAML
25 lines
788 B
YAML
---
|
|
- name: Creating grafana database
|
|
mysql_db:
|
|
login_host: "{{ database_address }}"
|
|
login_port: "{{ database_port }}"
|
|
login_user: "{{ database_user }}"
|
|
login_password: "{{ database_password }}"
|
|
name: "{{ grafana_database_name }}"
|
|
run_once: True
|
|
delegate_to: "{{ groups['grafana'][0] }}"
|
|
|
|
- name: Creating grafana database user and setting permissions
|
|
mysql_user:
|
|
login_host: "{{ database_address }}"
|
|
login_port: "{{ database_port }}"
|
|
login_user: "{{ database_user }}"
|
|
login_password: "{{ database_password }}"
|
|
name: "{{ grafana_database_name }}"
|
|
password: "{{ grafana_database_password }}"
|
|
host: "%"
|
|
priv: "{{ grafana_database_name }}.*:ALL"
|
|
append_privs: "yes"
|
|
run_once: True
|
|
delegate_to: "{{ groups['grafana'][0] }}"
|